@neo4j-nvl/interaction-handlers 0.2.57 → 0.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -184,13 +184,22 @@ export class DrawInteraction extends BaseInteraction {
|
|
|
184
184
|
this.mouseDownNode = hitNodeEdges[0];
|
|
185
185
|
const canvasPos = getCanvasPosition(this.containerInstance, event);
|
|
186
186
|
const pos = getWorldPosition(this.nvlInstance, canvasPos);
|
|
187
|
+
const color = this.currentOptions.ghostGraphStyling?.node?.color ?? DefaultGhostGraphStyling.node.color;
|
|
188
|
+
const html = document.createElement('div');
|
|
189
|
+
html.style.width = '110%';
|
|
190
|
+
html.style.height = '110%';
|
|
191
|
+
html.style.position = 'absolute';
|
|
192
|
+
html.style.left = '-5%';
|
|
193
|
+
html.style.top = '-5%';
|
|
194
|
+
html.style.borderRadius = '50%';
|
|
195
|
+
html.style.backgroundColor = color;
|
|
187
196
|
this.newTempTargetNode = {
|
|
188
197
|
id: generateUniqueId(13),
|
|
189
198
|
size: this.currentOptions.ghostGraphStyling?.node?.size ?? DefaultGhostGraphStyling.node.size,
|
|
190
199
|
selected: false,
|
|
191
200
|
x: pos.x,
|
|
192
201
|
y: pos.y,
|
|
193
|
-
|
|
202
|
+
html
|
|
194
203
|
};
|
|
195
204
|
this.setNewRegularRelationshipToNewTempTargetNode();
|
|
196
205
|
this.nvlInstance.addAndUpdateElementsInGraph([this.newTempTargetNode], this.newTempRegularRelationshipToNewTempTargetNode ? [this.newTempRegularRelationshipToNewTempTargetNode] : []);
|