question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow for setting whether dragging from an element causes panning

See original GitHub issue

Issue 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 element
  • eles.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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
maxkfranzcommented, May 14, 2019

@lambdalisue’s extension is great, but basic native API support would be useful for things like changing the ele.grabbable() value automatically based on ele.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).

0reactions
maxkfranzcommented, Apr 26, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found