in modules/layers/src/layers/path-marker-layer/path-marker-layer.ts [85:114]
updateState({ props, oldProps, changeFlags }) {
if (changeFlags.dataChanged || changeFlags.updateTriggersChanged) {
const {
data,
getPath,
getDirection,
getMarkerColor,
getMarkerPercentages,
coordinateSystem,
coordinateOrigin,
} = this.props;
const { viewport } = this.context;
const projectFlat = (o) => this.projectFlat(o, viewport, coordinateSystem, coordinateOrigin);
this.state.markers = createPathMarkers({
data,
getPath,
getDirection,
getColor: getMarkerColor,
getMarkerPercentages,
projectFlat,
});
this._recalculateClosestPoint();
}
if (changeFlags.propsChanged) {
if (props.point !== oldProps.point) {
this._recalculateClosestPoint();
}
}
}