diff --git a/frontend/canvas.html b/frontend/canvas.html index 367cedb..62ef86f 100644 --- a/frontend/canvas.html +++ b/frontend/canvas.html @@ -1610,7 +1610,6 @@ Organization : OptiHK Limited } .origin-marker-node { - transform: translate(-50%, -50%); pointer-events: none; position: relative; width: 20px; @@ -1728,6 +1727,7 @@ Organization : OptiHK Limited useUpdateNodeInternals, applyNodeChanges, applyEdgeChanges, + useStore, } = window.ReactFlow; const { FORGE_COMPONENT_LABEL, @@ -2316,11 +2316,13 @@ Organization : OptiHK Limited return (
); }); - // Red "X" marker at the canvas origin (0,0). Non-selectable, always visible. + // Red "X" marker at the canvas origin. Non-selectable, always visible at fixed screen size. const OriginMarkerNode = memo(({ data }) => { + const zoom = useStore(state => state.transform[2]); + const inverseScale = zoom ? 1 / zoom : 1; const title = `Canvas origin (${(data.originX ?? 0).toFixed(1)}, ${(data.originY ?? 0).toFixed(1)})`; return ( -