diff --git a/frontend/src/lib/components/graph/svelvet/container/views/GraphView.svelte b/frontend/src/lib/components/graph/svelvet/container/views/GraphView.svelte index 0739dd0963..a0c16d86f6 100644 --- a/frontend/src/lib/components/graph/svelvet/container/views/GraphView.svelte +++ b/frontend/src/lib/components/graph/svelvet/container/views/GraphView.svelte @@ -75,7 +75,7 @@ onMount(() => { // actualizes the d3 instance - const nodes = d3.select(`.zoomable`).call(d3Zoom).on('dblclick.zoom', null) + const nodes = d3.select(`#zoomable-${canvasId}`).call(d3Zoom).on('dblclick.zoom', null) if (!scroll) { ;[nodes].forEach((d3Instance) => { @@ -87,14 +87,14 @@ }) } - d3.select('#zoom_in').on('click', function () { + d3.select(`#zoom_in_${canvasId}`).on('click', function () { try { d3Zoom.scaleBy(nodes.transition().duration(250), 1.4) } catch (e) { console.log('error', e) } }) - d3.select('#zoom_out').on('click', function () { + d3.select(`#zoom_out_${canvasId}`).on('click', function () { try { d3Zoom.scaleBy(nodes.transition().duration(250), 0.714) } catch (e) { @@ -123,7 +123,7 @@ } -