Open bytasv opened 1 year ago
@bytasv okay.
i’ll test it internally. and add method soon.
@bytasv
* `infinite-viewer` 0.25.0
* `lit-infinite-viewer` 0.24.0
* `preact-infinite-viewer` 0.22.0
* `react-infinite-viewer` 0.25.0
* `svelte-infinite-viewer` 0.24.0
* `vue-infinite-viewer` 0.24.0
* `vue3-infinite-viewer` 0.14.0
* `ngx-infinite-viewer` 0.24.0
infinite-viewer's new version is released.
and .setTo
, .setBy
methods are added.
.setTo({
x: 0,
y: 0,
zoom: 1,
duration: 1000,
});
Try it!.
Hello,
I'm trying to implement logic which would store scroll top/left and zoom values and then restore that setting later on. For this I'm using
onScroll
(to store left/top) andonPinch
(to store zoom). Storing part works ok, however when I want to restore that setting, I need to call two methods:I noticed that when
setZoom
is called,onScroll
is also triggered - which makes sense because left/top changes, I have a suspicion that because of that sometimes race condition happens and restoration messes up.I was wondering:
scrollTo
method be extended to includezoom
value in theoptions
?Basically I'd like to have a "stable" way to retrieve current position of viewer and later set that position without causing side effects like accidentally triggering and overwriting top/left
What do you think about that?