From da6a47b1da7d640651fecdf514d654307a4308d8 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 22 Mar 2022 22:55:48 -0500 Subject: [PATCH] Fixed position of links --- src/components/Context.vue | 60 +++++------------------------------ src/features/links/Link.vue | 33 +++++++++++++------ src/features/links/Links.vue | 61 +++++++++++++++++++++++++++++------- src/game/layers.tsx | 3 +- 4 files changed, 81 insertions(+), 76 deletions(-) diff --git a/src/components/Context.vue b/src/components/Context.vue index f123221..0a44d4a 100644 --- a/src/components/Context.vue +++ b/src/components/Context.vue @@ -1,6 +1,5 @@ - - diff --git a/src/features/links/Link.vue b/src/features/links/Link.vue index 8371836..9159f87 100644 --- a/src/features/links/Link.vue +++ b/src/features/links/Link.vue @@ -13,32 +13,47 @@ - - diff --git a/src/features/links/Links.vue b/src/features/links/Links.vue index fa5ead1..cab8aae 100644 --- a/src/features/links/Links.vue +++ b/src/features/links/Links.vue @@ -4,34 +4,71 @@ v-for="(link, index) in validLinks" :key="index" :link="link" + :boundingRect="boundingRect" :startNode="nodes[link.startNode.id]!" :endNode="nodes[link.endNode.id]!" /> +
+ + diff --git a/src/game/layers.tsx b/src/game/layers.tsx index 6706912..5733ade 100644 --- a/src/game/layers.tsx +++ b/src/game/layers.tsx @@ -22,9 +22,8 @@ import { persistent, PersistentRef } from "./persistence"; import player from "./player"; export interface FeatureNode { - x?: number; - y?: number; rect?: DOMRect; + observer?: MutationObserver; element: HTMLElement; }