fix(web): Improve zoom behavior in photo-viewer. (#18803)
* Fix an issue where clicking the zoom-button after having zoomed in would not zoom completely out, but leave the image in the zoomed-in state. The new behavior properly zoomes the image completely out after clicking the zoom-button. * Revert to the default setting for `wheelZoomRatio` as the previous setting of 0.2 was borderline unusable on a trackpad. This could probably be moved to a user setting if needed. * Add a keyboard shortcut 'z' to toggle image zoom.
This commit is contained in:
@@ -2,4 +2,3 @@ import type { ZoomImageWheelState } from '@zoom-image/core';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const photoZoomState = writable<ZoomImageWheelState>();
|
||||
export const zoomed = writable<boolean>();
|
||||
|
||||
Reference in New Issue
Block a user