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.

Distinguish between user and layout zoom/pan

See original GitHub issue

Description of new feature

I would like to distinguish between a layout zoom/pan and a user zoom/pan.

Motivation for new feature

As a default behaviour in my application, I want to fit everything to the screen using the layout fit: true.

However, if the user wants to explore the graph closer, I want to change the layout options to fit: false, in order for the user to be in control. The reason for this is that my layout runs everytime new data is coming in to the graph and when the user is in control the graph should not fit again.

This switch should only happen on the user initiated zoom/pan, however with the current event handlers for zoom and pan, I cannot distinguish whether it was the user or the layout.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkfranzcommented, Oct 6, 2020

What about the addition of events like these?

  • pinchzoom
  • scrollzoom
  • dragpan

Those kinds of events kill two birds with one stone: You can tell that they’re user generated, and you can also tell exactly what kind of gesture originated a viewport change.

I think that this would just involve adding extra emit()s nearby the existing emit() calls in the renderer and updating the docs. Would you be interested in making a PR for events like these?

0reactions
charles-stuart-appdetexcommented, Dec 11, 2020

I’ll try and take a look next week. Thanks for the details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Zoom, Pan, and Hover Controls
You can bring your graphing and data analysis to the next level with zoom, pan, and hover. In this guide, we'll show you...
Read more >
D3 Zoom and Pan | D3 in Depth
'zoom' indicates a change of transform (e.g. the user has zoomed or panned). 'start' indicates the start of the zoom or pan (e.g....
Read more >
framerate issue with ffmpeg zoompan filter
with a lot of searching on this board, I've been able to put the following ffmpeg command together.
Read more >
Zoom/Extents - ProtoMAX KnowledgeBase
Zoom Cursor is the default command for LAYOUT . When you cancel another command, or finish some commands, LAYOUT returns to the Zoom...
Read more >
Quick ways to navigate data frames and layouts—ArcMap
Navigating with the mouse; Navigation while using other tools; Recentering the map with one click; The Continuous Zoom/Pan tool; Other navigation shortcuts ...
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