mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-16 05:18:38 +01:00
fix (image): improve image zoom
This commit is contained in:
parent
9332c3b9ef
commit
ca68df76ab
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ function builder({ $img }) {
|
|||
rxjs.fromEvent($img.parentElement, "wheel").pipe(
|
||||
rxjs.tap((e) => e.preventDefault()),
|
||||
rxjs.throttleTime(100, rxjs.animateFrameScheduler),
|
||||
rxjs.map((e) => ({ scale: Math.exp(-e.deltaY / 300), clientX: e.clientX, clientY: e.clientY })),
|
||||
rxjs.map((e) => ({ scale: Math.min(Math.exp(-e.deltaY / 300), 2), clientX: e.clientX, clientY: e.clientY })),
|
||||
),
|
||||
// zoom via keyboard shortcut
|
||||
rxjs.fromEvent(window, "keydown").pipe(
|
||||
|
|
|
|||
Loading…
Reference in a new issue