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
The 'zoom' event is being dispatched by the wheelZoom function before the actual zooming happens. I would like to hook to this event and be able to read the new viewport to adjust other elements in the SVG (my use case is keeping vector-effect-like stroke of a line, i.e. same pixels width whatever zoom level I am in).
If dispatching this event cannot be done later, I suggest dispatching another event (e.g. 'afterZoom') at the very end of this function. This is the workaround I have put in place and seems to be working perfectly.
Many thanks for any suggestions/actions on this.
The text was updated successfully, but these errors were encountered:
That might be useful. What I did, was just using setTimeout(fn, 0) in the zoom event to make the zoom happen first and run my code afterwards but I see that a seperate event might be cleaner. The reason the event comes first is because it is cancelable. So you actually can prevent the zoom from happening.
The 'zoom' event is being dispatched by the wheelZoom function before the actual zooming happens. I would like to hook to this event and be able to read the new viewport to adjust other elements in the SVG (my use case is keeping vector-effect-like stroke of a line, i.e. same pixels width whatever zoom level I am in).
If dispatching this event cannot be done later, I suggest dispatching another event (e.g. 'afterZoom') at the very end of this function. This is the workaround I have put in place and seems to be working perfectly.
Many thanks for any suggestions/actions on this.
The text was updated successfully, but these errors were encountered: