You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@h5web/lib zoomed area changes when visDomain is updated #1812
when zoomed into a plot and the visDomain of the abscissa or the ordinate is updated (e.g. due to a new dataset being added and therefore the limits being changed), the zoomed area changes.
I guess this is because currently zooming works on the basis of fractions of the total visDomain.
For other plot libraries this is typically not the default behavior and zoomed area stays constant in terms of x and y range.
So far, I found a workaround using a component which tracks whether the camera is zoomed (similar to the component and only update the visDomain when it is not zoomed in. However, I think this is a bit weird and needs extra redraws when zooming out again.
To put it differently, you'd like the "visible domain" when zoomed in to remain stable when the "data domain" changes, is that right? In the screen recording below, for instance, you would like the ordinate axis to remain roughly between 0 and 200 after the user interacts with the domain slider.
Activity
axelboc commentedon Jun 2, 2025
To put it differently, you'd like the "visible domain" when zoomed in to remain stable when the "data domain" changes, is that right? In the screen recording below, for instance, you would like the ordinate axis to remain roughly between 0 and 200 after the user interacts with the domain slider.
Screencast.from.2025-06-02.15-08-10.webm
CPrescher commentedon Jun 2, 2025
Yes, exactly.