Allow for setting whether dragging from an element causes panning
See original GitHub issueIssue type
Feature request
Description of new feature
Allow for no panning to occur when dragging on an edge.
Proposed API:
ele.pannable()
: Get whether panning happens when dragging on the elementeles.panify()
: Make the elements pannable.eles.unpanify()
: Make the elements unpannable.
This allows for per-element granularity, and it’s consistent with existing functions like node.grabbable()
.
Motivation for new feature
When a tapdown
-tapdrag
gesture happens on an edge, it causes panning. This is useful for dense graphs, where panning on an empty area may be difficult.
However, it may be desirable for some apps to have their own behaviour for dragging on an edge. For example, you may want to drag the connected nodes of an edge when the edge is dragged.
This would be useful in apps like Factoid.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Disable panning/dragging on leaflet map for div within map
DomEvent. stopPropagation ); It will stop the dragging of the map inside the div element.
Read more >d3.js - Pan during dragging in D3JS - Stack Overflow
allow Pan start when i'm in drag "mode" - this is most the question; don't allow to trigger context menu when release RightMenuButton...
Read more >Surface Widget - jsPlumb Toolkit Edition
The Surface widget is an 'infinite pan' canvas that does not use scrollbars. To pan the canvas, the user drags using the left...
Read more >Drag operations - Web APIs - MDN Web Docs - Mozilla
When an image or link is dragged, the URL of the image or link is set as the drag data, and a drag...
Read more >Middle mouse button or wheel does not perform PAN ...
Causes: · Defective hardware or outdated mouse driver. · Mouse settings in Windows are incorrect. · The Mouse has a customization software ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lambdalisue’s extension is great, but basic native API support would be useful for things like changing the
ele.grabbable()
value automatically based onele.pannable()
. Even with the native feature, the extension could have convenience functions for things like toggling the pan anywhere mode. Another useful extension feature would be to easily customise keyboard shortcuts for toggling pan anywhere mode (e.g. enable pan anywhere mode when shift is held).You can get the Cytoscape version via
cytoscape.version
.You can use the reported version number to determine whether features like pannable are supported in that version. If you’re using version that is too old, you could ask the folks at Plotly to upgrade their Dash component.