mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-14 06:49:05 +02:00
add node click handle
This commit is contained in:
@@ -71,6 +71,15 @@
|
||||
menu = null;
|
||||
relationshipPanel = '';
|
||||
}
|
||||
|
||||
function handleNodeClick({
|
||||
detail: { event, node }
|
||||
}: {
|
||||
detail: { event: MouseEvent; node: Node };
|
||||
}) {
|
||||
event.preventDefault();
|
||||
personPanel = node.data;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div style="height:100vh;">
|
||||
@@ -80,7 +89,7 @@
|
||||
{nodeTypes}
|
||||
{edges}
|
||||
on:nodecontextmenu={handleContextMenu}
|
||||
on:nodeclick
|
||||
on:nodeclick={handleNodeClick}
|
||||
on:paneclick={handlePaneClick}
|
||||
class="bg-base-100"
|
||||
fitView
|
||||
|
Reference in New Issue
Block a user