Skip to content

Commit

Permalink
Merge pull request #1518 from concord-consortium/188333898-fix-graph-…
Browse files Browse the repository at this point in the history
…points

Fix the graph issue after Pixi v8 upgrade
  • Loading branch information
pjanik authored Sep 25, 2024
2 parents 01ef96e + 6b53ecb commit 5917fc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions v3/src/components/graph/hooks/use-plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ export const usePlotResponders = (props: IPlotResponderProps) => {
refreshPointPositions(selectedOnly)
})

// Refresh point positions when pixiPoints become available to fix this bug:
// https://www.pivotaltracker.com/story/show/188333898
// This might be a workaround for the fact that useDebouncedCallback may not be updated when pixiPoints
// (a dependency of refreshPointPositions) are updated. useDebouncedCallback doesn't seem to declare any
// dependencies and I'd imagine it returns a stable result (?).
useEffect(() => {
callRefreshPointPositions(false)
}, [callRefreshPointPositions, pixiPoints])

// respond to numeric axis domain changes (e.g. axis dragging)
useEffect(() => {
return mstReaction(
Expand Down

0 comments on commit 5917fc6

Please sign in to comment.