Repository navigation
fix(core): attribute transition bugs - #10738
Conversation
|
|
|
||
| if (PolygonStrokeLayer || LineStringsLayer) { | ||
| const forwardedProps = forwardProps(this, LINE_LAYER.props); | ||
| const forwardedProps = forwardProps(this, LINE_LAYER.props, 'getPath'); |
There was a problem hiding this comment.
Custom transitions stop working
When linestrings is replaced through _subLayerProps[id].type by a layer whose geometry attribute uses an accessor such as getPosition, this code still forwards transitions.geometry only as getPath. The replacement layer cannot find the transition under its own accessor, so its geometry transition is silently disabled. The transition key must account for the resolved sublayer class or be configurable for custom replacements.
There was a problem hiding this comment.
Worth mixing customizations in?
There was a problem hiding this comment.
I wouldn’t mix that into this fix. Replacement sublayers are expected to honor the geometry contract of their slot: linestrings and polygons-stroke receive getPath, while polygons-fill receives getPolygon. A custom layer that only uses getPosition would already be incompatible with the slot’s geometry data, independent of transitions. So forwarding transitions.geometry under getPath is consistent with the existing contract.
(cherry picked from commit b57521a)
|
Released in deck.gl 9.4.1. Thanks @Pessimistress! |
Change List
enterbehavior is expectedtransition.geometryto PathLayer'stransition.getPathand PolygonLayer'stransition.getPolygon(previously mapped togetPositiononly)