modify original point size
This commit is contained in:
@@ -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 (<div className="canvas-boundary-node" title={`x[${b.xmin}, ${b.xmax}] y[${b.ymin}, ${b.ymax}] um`} />);
|
||||
});
|
||||
|
||||
// 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 (
|
||||
<div className="origin-marker-node" title={title}>
|
||||
<div className="origin-marker-node" style={{ transform: `translate(-50%, -50%) scale(${inverseScale})` }} title={title}>
|
||||
<svg viewBox="-10 -10 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle className="origin-circle" cx="0" cy="0" r="6" />
|
||||
<line className="origin-x" x1="-8" y1="-8" x2="8" y2="8" />
|
||||
|
||||
Reference in New Issue
Block a user