Skip to content

Commit

Permalink
[fix] fix neighbor mode hovering crash in arc/line layers (#2920)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta authored Jan 20, 2025
1 parent e2bd71d commit d6aa275
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/layers/src/arc-layer/arc-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,14 @@ export default class ArcLayer extends Layer {
objectInfo.index >= 0 &&
this.dataContainer
) {
return {
index: objectInfo.index,
position: this.getPositionAccessor(this.dataContainer)(objectInfo)
};
// objectInfo.index can point to data of arcs created in neighbor mode, so get index to source data.
const hoveredObject = super.hasHoveredObject(objectInfo);
return hoveredObject
? {
index: hoveredObject.index,
position: this.getPositionAccessor(this.dataContainer)({index: hoveredObject.index})
}
: null;
}

return super.hasHoveredObject(objectInfo);
Expand Down

0 comments on commit d6aa275

Please sign in to comment.