From 351110b9d8076cbb81c41514df20693ff10b3c46 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 27 Nov 2023 15:58:16 +0800 Subject: [PATCH] Supress context menu while alt-clicking node during on-canvas rel-create operation (#42) --- .../GraphVisualizer/Graph/visualization/Visualization.ts | 3 +++ src/neo4j-arc/package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts index 8fdfee786fa..9bdc3be67fa 100644 --- a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts +++ b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts @@ -173,6 +173,9 @@ export class Visualization { .selectAll('g.node') .attr('transform', d => `translate(${d.x},${d.y})`) .attr('data-testid', 'nodeGroups') + .on('contextmenu', function (event) { + event.preventDefault() + }) nodeRenderer.forEach(renderer => nodeGroups.call(renderer.onTick, this)) diff --git a/src/neo4j-arc/package.json b/src/neo4j-arc/package.json index 6b533c7995c..75761dca75c 100644 --- a/src/neo4j-arc/package.json +++ b/src/neo4j-arc/package.json @@ -1,6 +1,6 @@ { "name": "neo4j-devtools-arc", - "version": "0.0.70", + "version": "0.0.71", "main": "dist/neo4j-arc.js", "author": "Neo4j Inc.", "license": "GPL-3.0",