Comments (1)
I think it makes sense, but not sure that I fully grasp all the consequences or would know how to code this. If we want to do this, it would clearly be better to do it at once, rather than have two successive breaking changes in v6 then v7.
It's fun that you post this in d3-drag, as drag is the behavior that does not use the DOM to store state (it's usually stored in the datum through the subject method).
In fact, one tangential question I've had is whether d3-drag is necessary at all, given that dragging is but a subset of zooming (it's like d3.zoom().scaleExtent([1, 1]) with no wheel nor dblclick.). In concrete terms the only things we can't do currently with d3-zoom are:
- setting the subject when the gesture starts (could be added easily);
- having an arbitrary storage for the transform's location (instead of this.property(__zoom), allowing to store the transforms in the datum) [linked to the previous point]
- mixing two zoom behaviors on the same node (https://observablehq.com/d/bf23cdda80dd75bb where I'm doing both zoom and "drag as zoom" would not be doable cleanly in canvas, as both behaviors would claim the canvas node's __zoom property) [linked to the previous point]
Related: d3/d3-selection#191
from d3-drag.
Related Issues (20)
- Possible typo in README HOT 2
- What are the perposes of functions yesdrag and nodrag?
- Drag event on Chrome 72 HOT 3
- d3 mouseup event not firing HOT 1
- Drag Event Issue on Windows Chrome 74, related to solution for #47 HOT 1
- The default filter should return false if event.ctrlKey. HOT 5
- drag start event is don't send when Ctrl-key is press HOT 1
- drag.on("init") ? HOT 7
- Click event not firing if drag enables with simulation HOT 1
- Non-cancelable event HOT 3
- remove drag.container? HOT 1
- remove dragEvent.on?
- d3.event is not available in version 6.1.1 HOT 1
- DragEvent missing event.currentTarget for arrow function node selection HOT 1
- Make event listeners non-passive. HOT 2
- d3.drag() causes error in testing mousedown event via jsdom HOT 4
- d3.pointer() could use event.touches[0] HOT 2
- Add event.currentTarget
- Support d3.drag in testing environments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-drag.