fixed node resizer & inlineWidth and inlineHeight

This commit is contained in:
peterkogo
2024-02-28 16:50:30 +01:00
parent 87ea4f877a
commit 84611e2f72
3 changed files with 9 additions and 9 deletions
@@ -184,7 +184,7 @@
style:z-index={zIndex}
style:transform="translate({positionOriginX}px, {positionOriginY}px)"
style:visibility={initialized ? 'visible' : 'hidden'}
style="{inlineStyleDimensions.width} {inlineStyleDimensions.height} {style ?? ''};"
style="{style ?? ''};{inlineStyleDimensions.width}{inlineStyleDimensions.height}"
on:click={onSelectNodeHandler}
on:mouseenter={(event) => dispatch('nodemouseenter', { node, event })}
on:mouseleave={(event) => dispatch('nodemouseleave', { node, event })}
@@ -35,7 +35,7 @@
let className: $$Props['class'] = '';
export { className as class };
const { nodeLookup, snapGrid, viewport, nodes } = useStore();
const { nodeLookup, snapGrid, viewport, nodes, nodeOrigin } = useStore();
const contextNodeId = getContext<string>('svelteflow__node_id');
$: id = typeof nodeId === 'string' ? nodeId : contextNodeId;
@@ -64,7 +64,8 @@
nodeLookup: $nodeLookup,
transform: [$viewport.x, $viewport.y, $viewport.zoom],
snapGrid: $snapGrid ?? undefined,
snapToGrid: !!$snapGrid
snapToGrid: !!$snapGrid,
nodeOrigin: $nodeOrigin
};
},
onChange: (change: XYResizerChange, childChanges: XYResizerChildChange[]) => {