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
this.wheelZoom$=newSubject().pipe(startWith(1),merge(this.wheelEvent$),map(delta=>{constorigin=this.bgWH$// get the image's scalingletrate=this.zoomRate*Math.max(origin,0.8)*deltareturnMath.max(origin+rate,this.minScale)}))
also, there is a touch event that zooms the image.
Todo
Apply these corrections in the next version.
The text was updated successfully, but these errors were encountered:
Original zooming logic
Take mouse wheel zooming as an example
process
origin = 1
(on wheel event) origin = origin + rate1 = scale => (image's transform scale)
(on wheel event) origin = origin + rate2 = scale => (image's transform scale)
(on wheel event) origin = origin + rate3 = scale => (image's transform scale)
...
sometimes this might cause problems.
Correction
It should calculate the new scaling value base on the image's scaling value directly.
process correction
scale = 1 (by default)
(on wheel event) scale = scale + rate1 => (image's transform scale)
(on wheel event) scale = scale + rate2 = scale => (image's transform scale)
(on wheel event) scale = scale + rate3 = scale => (image's transform scale)
...
Wheel event zooming
also, there is a touch event that zooms the image.
Todo
Apply these corrections in the next version.
The text was updated successfully, but these errors were encountered: