diff --git a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
index 9a20b12fe..18b44936a 100644
--- a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
+++ b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
@@ -17,7 +17,7 @@ import contextMenu from "../../../menus/context_menu";
import appContext from "../../../components/app_context";
import RelationMapApi, { MapData, MapDataNoteEntry } from "./api";
import setupOverlays, { uniDirectionalOverlays } from "./overlays";
-import { JsPlumb } from "./jsplumb";
+import { JsPlumb, JsPlumbItem } from "./jsplumb";
interface Clipboard {
noteId: string;
@@ -359,18 +359,14 @@ function NoteBox({ noteId, x, y, mapApiRef }: MapDataNoteEntry & { mapApiRef: Re
}, [ note ]);
return note && (
-
+
)
}
diff --git a/apps/client/src/widgets/type_widgets/relation_map/jsplumb.tsx b/apps/client/src/widgets/type_widgets/relation_map/jsplumb.tsx
index 88b307bc4..6da913f45 100644
--- a/apps/client/src/widgets/type_widgets/relation_map/jsplumb.tsx
+++ b/apps/client/src/widgets/type_widgets/relation_map/jsplumb.tsx
@@ -1,5 +1,6 @@
import { jsPlumb, Defaults, jsPlumbInstance } from "jsplumb";
import { ComponentChildren, RefObject } from "preact";
+import { HTMLProps } from "preact/compat";
import { useEffect, useRef } from "preact/hooks";
export function JsPlumb({ className, props, children, containerRef: externalContainerRef, apiRef, onInstanceCreated }: {
@@ -39,3 +40,18 @@ export function JsPlumb({ className, props, children, containerRef: externalCont
)
}
+
+export function JsPlumbItem({ x, y, children, ...restProps }: {
+ x: number;
+ y: number;
+ children: ComponentChildren;
+} & Pick, "className" | "onContextMenu">) {
+ return (
+
+ {children}
+
+ )
+}