s-yadav / iv-viewer

A zooming and panning plugin inspired by google photos for your web images.
MIT License
450 stars 163 forks source link

'onWindowResize' is not a function #118

Open roberttolton opened 2 months ago

roberttolton commented 2 months ago

Hi, thanks for your work on this package.

When running the hide method, an error is thrown:

TypeError: _this._events.onWindowResize is not a function

It looks like the only place onWindowResize is initialised is if refreshOnResize is set to true in the options, so the code should probably check first if onWindowResize is defined before calling it?

Although also note that even if you provide refreshOnResize: true in the options (which is default true anyway..), the hide method still throws this error, so something odd is going on.