in src/layers/line-layer/line-layer.js [54:104]
renderLayer(opts) {
const {data, gpuFilter, objectHovered, interactionConfig} = opts;
const layerProps = {
widthScale: this.config.visConfig.thickness
};
const colorUpdateTriggers = {
color: this.config.color,
colorField: this.config.colorField,
colorRange: this.config.visConfig.colorRange,
colorScale: this.config.colorScale,
targetColor: this.config.visConfig.targetColor
};
const defaultLayerProps = this.getDefaultDeckLayerProps(opts);
return [
// base layer
new EnhancedLineLayer({
...defaultLayerProps,
...this.getBrushingExtensionProps(interactionConfig, 'source_target'),
...data,
...layerProps,
getColor: data.getSourceColor,
updateTriggers: {
getFilterValue: gpuFilter.filterValueUpdateTriggers,
getWidth: {
sizeField: this.config.sizeField,
sizeRange: this.config.visConfig.sizeRange,
sizeScale: this.config.sizeScale
},
getColor: colorUpdateTriggers,
getTargetColor: colorUpdateTriggers
},
extensions: [...defaultLayerProps.extensions, new BrushingExtension()]
}),
// hover layer
...(this.isLayerHovered(objectHovered)
? [
new EnhancedLineLayer({
...this.getDefaultHoverLayerProps(),
...layerProps,
data: [objectHovered.object],
getColor: this.config.highlightColor,
getTargetColor: this.config.highlightColor,
getWidth: data.getWidth
})
]
: [])
];
}