score:4
Accepted answer
I have implemented individual dragging of nodes working along with overall zooming and panning functionality. Used stopPropagation
of the event in dragstart
event of circles.
Hope this helps.
var move = d3.behavior.drag()
.on("dragstart", function() {
d3.event.sourceEvent.stopPropagation();
});
Working JSFiddle
Source: stackoverflow.com
Related Query
- d3js zoom + drag causes conflict
- Zoom event overrides Drag behavior in d3js
- upgrading d3js from v3 to v4 causes zoom problems
- d3 force layout zoom and pan conflict with node drag
- Scale / Redraw d3.js gridlines on zoom / drag
- How to use mouse click and drag to zoom in D3
- d3.js: Drag is disabled when use zoom with force layout
- D3 zoom event firing on drag in Angular
- D3js zoom with reset function
- D3 Collapsible Tree only drag without zoom and jump and scroll
- d3 combine zoom and drag calls?
- D3 V6 - Zoom and Drag Functionality
- d3js jumpy zoom behavior
- d3js force button to allow/disable drag actions
- Add zoom to d3js map using d3fc-label-layout
- D3js drag vs click
- How to set an initially determined zoom level based on data d3js
- Zoom causes graph to go out of the plotting area bounds
- D3js reset the origin of a drag behaviour
- Adding several y axes with zoom / pan in D3js
- d3 zoom and drag with SVG axes and canvas chart
- Pan, zoom canvas together with drag nodes in D3
- D3 behave weird when I do a drag act which also trigger unexpected zoom function
- Allow zoom with buttons only, allow pan with mouse drag
- D3js cartography: auto-focus on geographic area ? (svg canvas, zoom scale, coordinate translation)
- Get d3 v4 zoom and drag working together - simple example
- D3js drag behavior with nodes and links
- Force + Drag + Zoom : freeze after few seconds
- d3js v5 + topojson v3 Center a square centroid with zoom
- circle location different when zoom or drag the d3 map?
More Query from same tag
- Is there a way to apply transitions to numbers formated as currency in D3?
- How to style SVG node with :before pseudo element
- Where can I get the .geojson file for India and not separate files for each state/territory or any other distinction?
- D3.js v4.0.0-alpha.35 Transitions not working
- How do I create a definition list with d3.js?
- is it possible to create a dynamic grid line chart in d3?
- Async ajax calls messes up image source
- How to simultaneously update the color of elements in a SVG when I mouseover elements of a second SVG using D3
- d3 js bidirectional horizontal bar chart
- Disable zoom on selected elements only
- Heatmap dc.js - provide the color range manually
- Send POST request in d3 (with d3-fetch)
- D3 line .defined() with different array
- bezier control point orientation d3
- D3 bar chart transition confusion
- Cannot render path from source to target in D3.js, migrating v3 to v4
- d3.js Molecule Diagram only working on the last element of the object
- D3 - can you pass a string to function to use as key?
- D3.js How to update a global variable from d3.select()
- How to split multiple D3 transform commands into separate statements
- D3 auto updates when array length change
- Need some help on D3 pie layout adding line to label
- How to check the type of value in a CSV with d3.csv()?
- D3.js prepend (similar to jQuery prepend)
- SVG element coming partially below another SVG element
- Creating a categorical line chart in D3.js (V4)
- Draw D3 Simple Line chart With an Array
- D3 scatterplot hot to manage domain and range properly?
- D3js - can't change style for svg text elemets
- d3.js dynamic Tooltip for Chord diagram