panzoom icon indicating copy to clipboard operation
panzoom copied to clipboard

Zoom which is idempotent to the order of application

Open mateja176 opened this issue 5 years ago • 0 comments

First of all, thank you very much for all the work you've put into panzoom, you've created a truly awesome library!

On the other hand, according to the type declarations, both zoomTo and zoomAbs accept a clientX and a clientY.

Screenshot from 2020-02-18 00-45-26

The issue is however that the order of applying zoom operations matters. For example, you are not going to end up in the same state if you first apply action A (zoomAbs(100, 100, 1.1)) followed by action B (zoomAbs(200, 200, 1.2)) compared to applying action B followed by action A.

It'd be handy to have an operation which is idempotent to the order of application, similar to moveTo, but for scaling. For example, it may accept x and y coordinates as well as a scale value.

mateja176 avatar Feb 18 '20 00:02 mateja176