MCPcopy Index your code
hub / github.com/microsoft/SandDance / newPolygonLayer

Function newPolygonLayer

packages/vega-deck.gl/src/layers.ts:129–148  ·  view source on GitHub ↗
(id: string, data: Polygon[])

Source from the content-addressed store, hash-verified

127}
128
129function newPolygonLayer(id: string, data: Polygon[]) {
130 if (!data) return null;
131
132 const newlayer = new base.layers.PolygonLayer<Polygon>({
133 id,
134 data,
135 coordinateSystem: base.deck.COORDINATE_SYSTEM.CARTESIAN,
136 getPolygon: (o) => o.positions,
137 getFillColor: (o) => o.fillColor,
138 getLineColor: (o) => o.strokeColor,
139 wireframe: false,
140 filled: true,
141 stroked: true,
142 pickable: true,
143 extruded: true,
144 getElevation: (o) => o.depth,
145 getLineWidth: (o) => o.strokeWidth,
146 });
147 return newlayer;
148}
149
150function newTextLayer(presenter: Presenter, id: string, data: VegaTextLayerDatum[], config: PresenterConfig, fontFamily: string, characterSet: string[]) {
151 let alphaCutoff = config.getTextHighlightAlphaCutoff && config.getTextHighlightAlphaCutoff();

Callers 1

getLayersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected