feat(svelte): add getInternalNode and useInternalNode

This commit is contained in:
moklick
2024-05-02 16:39:57 +02:00
parent f2f2c3cc2e
commit 534db656b4
4 changed files with 39 additions and 9 deletions
@@ -141,7 +141,7 @@
handleNodeSelection(id);
}
dispatchNodeEvent('nodeclick', { node, event });
dispatchNodeEvent('nodeclick', { node: node.internals.userNode, event });
}
</script>
@@ -1,4 +1,4 @@
import type { Node } from '$lib/types';
import type { InternalNode, Node } from '$lib/types';
export type NodeWrapperProps = Pick<
Node,
@@ -32,6 +32,6 @@ export type NodeWrapperProps = Pick<
resizeObserver?: ResizeObserver | null;
isParent?: boolean;
zIndex: number;
node: Node;
node: InternalNode;
initialized: boolean;
};