d3 / d3-zoom

Pan and zoom SVG, HTML or Canvas using mouse or touch input.
https://d3js.org/d3-zoom
ISC License
507 stars 143 forks source link

d3 zoom without panning for force directed layout #82

Closed malshep closed 7 years ago

malshep commented 7 years ago

I want to use the zoom behavior, but without panning support enabled so that I can use it with the force directed layout, and therefore be able to interact and drag nodes even when zoomed.  Can't see how to do this with current code. Thx.

mbostock commented 7 years ago

See these examples (and the d3-drag README:

Please use Stack Overflow tag d3.js to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly. Stack Overflow provides a better collaborative forum for self-help: tens of thousands of D3-related questions have already been asked there, and some answered questions may be relevant to you.

When asking for help, please include a link to a live example that demonstrates the issue, preferably on bl.ocks.org. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.

If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.

Thank you! 🤗

malshep commented 7 years ago

Mike: Sorry, will do.

BTW: Fantastic work!!!

Thanks!