@deck.gl/carto 9.0.25 → 9.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "9.0.25",
6
+ "version": "9.0.26",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -72,5 +72,5 @@
72
72
  "@deck.gl/layers": "^9.0.0",
73
73
  "@loaders.gl/core": "^4.2.0"
74
74
  },
75
- "gitHead": "7f2f016c464ba82472e732a213076a7248cb2c05"
75
+ "gitHead": "207f67da86ca13e92eee6b96a934b76f92926d4c"
76
76
  }
@@ -134,19 +134,30 @@ export default class VectorTileLayer<
134
134
  const tileBbox = props.tile.bbox as any;
135
135
  const {west, south, east, north} = tileBbox;
136
136
 
137
+ const extensions = [new ClipExtension(), ...(props.extensions || [])];
137
138
  const clipProps = {
138
- extensions: [new ClipExtension(), ...(props.extensions || [])],
139
139
  clipBounds: [west, south, east, north]
140
140
  };
141
141
 
142
+ const applyClipExtensionToSublayerProps = (subLayerId: string) => {
143
+ return {
144
+ [subLayerId]: {
145
+ ...clipProps,
146
+ ...props?._subLayerProps?.[subLayerId],
147
+ extensions: [...extensions, ...(props?._subLayerProps?.[subLayerId]?.extensions || [])]
148
+ }
149
+ };
150
+ };
151
+
142
152
  const subLayerProps = {
143
153
  ...props,
144
154
  autoHighlight: false,
145
155
  // Do not perform clipping on points (#9059)
146
156
  _subLayerProps: {
147
- 'polygons-fill': clipProps,
148
- 'polygons-stroke': clipProps,
149
- linestrings: clipProps
157
+ ...props._subLayerProps,
158
+ ...applyClipExtensionToSublayerProps('polygons-fill'),
159
+ ...applyClipExtensionToSublayerProps('polygons-stroke'),
160
+ ...applyClipExtensionToSublayerProps('linestrings')
150
161
  }
151
162
  };
152
163