sohobion.blogg.se

Imageviewer 4
Imageviewer 4





imageviewer 4 imageviewer 4

IMAGEVIEWER 4 UPDATE

The second image is optional, which you should pass when you feel you can improve the image loading experience by first showing low quality image and then progressively update it with high quality image. In all of the above example it will first try to display the first image and then load the second image (if passed) in parallel. The current instance which contains all other info if needed The data passed to each callback is very useful, it contains the current instance with more info that you can use to react to the instance state OptionĪ boolean value that determine if the zoom value reached the initial zoom.Ī boolean value that determine if the zoom value reached the maximum zoom. Import ImageViewer from 'iv-viewer' const viewer = new ImageViewer ( element, ) Callback Data There are multiple listeners you can register with each viewer instance Multiple useful callbacks that could use in-order to get the current state of the viewer The number of which the zoom should increase/decrease when the buttons are clicked On FullScreen mode it will refresh on window resize by default.ĭefines weather to allow zoom with mouse scroll or not.ĭefines weather to add zoom buttons or not

imageviewer 4

This is available only for Container and Image mode. It defines the max limit for the zoom value of the image.ĭefines whether to refresh the viewer on resize of window. It defines the initial zoom value of the image. querySelector ( '#image' ) const viewer = new ImageViewer ( image, options ) // check options section for supported options Options Option Import ImageViewer from 'iv-viewer' const image = document.







Imageviewer 4