I'm using the option wheelZoom, it's working fine but I got the following error.
45:18 Argument of type '{ wheelZoom: boolean; }' is not assignable to parameter of type 'false | options'.
Object literal may only specify known properties, but 'wheelZoom' does not exist in type 'options'. Did you mean to write 'doWheelZoom'?
43 | .size('400px', '400px')
44 | .viewbox(0, 0, 1200, 1920)
> 45 | .panZoom({ wheelZoom: false });
Looking into your source code, in file svg.panzoom.js.d.ts
interface options {
doPanning?: boolean
doPinchZoom?: boolean
doWheelZoom?: boolean
panMouse?: MouseButton
oneFingerPan?: boolean
margins?: boolean | marginOptions
zoomFactor?: number
zoomMin?: number
zoomMax?: number
}
But in src/svg.panzoom.js :
const doWheelZoom = options.wheelZoom ?? true
The typings are wrong. Feel free to fix and create PR. You can even do that directly on github without even forking and cloning. Just edit the file directly in your browser :)
Hi,
I'm using the option wheelZoom, it's working fine but I got the following error.
Looking into your source code, in file svg.panzoom.js.d.ts
But in src/svg.panzoom.js :
const doWheelZoom = options.wheelZoom ?? true
Thanks,