File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export function initPanzoom(node: HTMLElement) {
6363 if ( shouldZoom ) {
6464 // Normalize wheel delta to pixels across browsers (based on Facebook's normalize-wheel)
6565 // https://github.com/basilfx/normalize-wheel
66- const LINE_HEIGHT = 40 ; // Approximate pixels per line
66+ const LINE_HEIGHT = 25 ; // Tuned to match Chrome's zoom steps
6767 const PAGE_HEIGHT = 800 ; // Approximate pixels per page
6868 let pixelDelta : number ;
6969 if ( e . deltaMode === 1 ) {
@@ -79,7 +79,7 @@ export function initPanzoom(node: HTMLElement) {
7979
8080 // Calculate zoom multiplier (based on anvaka/panzoom approach)
8181 // speed * delta / 128, capped at 0.25 (25% max per event)
82- const zoomSpeed = 0.065 ;
82+ const zoomSpeed = 0.2 ;
8383 const sign = Math . sign ( pixelDelta ) ;
8484 const deltaAdjustedSpeed = Math . min ( 0.25 , Math . abs ( ( zoomSpeed * pixelDelta ) / 128 ) ) ;
8585 let scaleMultiplier = 1 - sign * deltaAdjustedSpeed ;
You can’t perform that action at this time.
0 commit comments