MCPcopy Create free account
hub / github.com/microsoft/SandDance / newPolygonLayer

Function newPolygonLayer

docs/app/js/sanddance-app.js:7494–7512  ·  view source on GitHub ↗
(id, data)

Source from the content-addressed store, hash-verified

7492 });
7493}
7494function newPolygonLayer(id, data) {
7495 if (!data) return null;
7496 let newlayer = new (0, _base.base).layers.PolygonLayer({
7497 id,
7498 data,
7499 coordinateSystem: (0, _base.base).deck.COORDINATE_SYSTEM.CARTESIAN,
7500 getPolygon: (o)=>o.positions,
7501 getFillColor: (o)=>o.fillColor,
7502 getLineColor: (o)=>o.strokeColor,
7503 wireframe: false,
7504 filled: true,
7505 stroked: true,
7506 pickable: true,
7507 extruded: true,
7508 getElevation: (o)=>o.depth,
7509 getLineWidth: (o)=>o.strokeWidth
7510 });
7511 return newlayer;
7512}
7513function newTextLayer(presenter, id, data, config, fontFamily, characterSet) {
7514 let alphaCutoff = config.getTextHighlightAlphaCutoff && config.getTextHighlightAlphaCutoff();
7515 if (alphaCutoff === undefined) alphaCutoff = 0.1;

Callers 1

getLayersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected