mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-25 00:23:12 +09:00
minimap: fix debounced zoom cleanup
This commit is contained in:
1 parent
35575a93a3
commit
5ff7d7ee42
1 file changed
+3
-3
@@ -1863,10 +1863,10 @@ export default function CanvasMinimapPage({
|
|||||||
zoomLevel: getClosestZoomLevel(viewStateRef.current.zoomLevel),
|
zoomLevel: getClosestZoomLevel(viewStateRef.current.zoomLevel),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Cleanup throttled zoom update on unmount
|
// Cleanup debounced zoom update on unmount
|
||||||
return () => {
|
return () => {
|
||||||
if (throttledZoomUpdate.current) {
|
if (debouncedZoomUpdate.current) {
|
||||||
clearTimeout(throttledZoomUpdate.current);
|
clearTimeout(debouncedZoomUpdate.current);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
Reference in new issue
Block a user