| 127 | } |
| 128 | |
| 129 | function 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 | |
| 150 | function newTextLayer(presenter: Presenter, id: string, data: VegaTextLayerDatum[], config: PresenterConfig, fontFamily: string, characterSet: string[]) { |
| 151 | let alphaCutoff = config.getTextHighlightAlphaCutoff && config.getTextHighlightAlphaCutoff(); |