From 65093014f564a2fa0f1aa593f7a444bea3cb16f1 Mon Sep 17 00:00:00 2001 From: xsxx03-art <你的邮箱@example.com> Date: Wed, 24 Jun 2026 16:50:50 +0800 Subject: [PATCH] modify original point size --- frontend/canvas.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 ( -
+