Skip to content

Commit

Permalink
fix: new map tile points not initially rendered (PT-181962645) (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
emcelroy authored Apr 24, 2024
1 parent 63c6e45 commit 2280427
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions v3/src/components/map/components/map-point-layer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ export const MapPointLayer = observer(function MapPointLayer({mapLayerModel, onS
}
}, [dataConfiguration.dataset, mapModel])

if (pixiPointsRef.current != null && pixiContainerRef.current && pixiContainerRef.current.children.length === 0) {
pixiContainerRef.current.appendChild(pixiPointsRef.current.canvas)
pixiPointsRef.current.resize(layout.contentWidth, layout.contentHeight)
}
useEffect(() => {
if (pixiPointsRef.current != null && pixiContainerRef.current && pixiContainerRef.current.children.length === 0) {
pixiContainerRef.current.appendChild(pixiPointsRef.current.canvas)
pixiPointsRef.current.resize(layout.contentWidth, layout.contentHeight)
}
}, [layout.contentWidth, layout.contentHeight])

const refreshConnectingLines = useCallback(() => {
if (!showConnectingLines && !connectingLinesActivatedRef.current) return
Expand Down

0 comments on commit 2280427

Please sign in to comment.