elevatezoom icon indicating copy to clipboard operation
elevatezoom copied to clipboard

Need to change zoomType to inner in mobile view

Open mpkumar87 opened this issue 10 years ago • 4 comments

Hi,

Need to change zoomType from window to inner when view in mobile screen. Please guide to me fix the issue..

Thanks, Premkumar M.

mpkumar87 avatar Feb 23 '15 07:02 mpkumar87

I have the same problem. Did anyone provide an answer

Hozey avatar Jul 24 '15 13:07 Hozey

i have same problem too.

ozanyaz avatar Jul 01 '16 06:07 ozanyaz

Anybody have found solution for this?

chandrantwins avatar Feb 20 '20 09:02 chandrantwins

Hi I am able to achieve by following code..

$(".zoom").elevateZoom();
var ezApi = $('.zoom').data('elevateZoom');
var mq = window.matchMedia('(min-width: 768px)');
mq.addListener((b) => {
  if (b.matches) {
               ezApi.destroy();
	  // do something for screens > 768px, for example turn on zoom	
		$(".zoom").elevateZoom({
			 'responsive':true		 
		});
  } else {
	  ezApi.destroy();
	  // do something for screens < 768px, for example turn off zoom	
		$(".zoom").elevateZoom({
			 'responsive':true,
			 'zoomType': 'lens',
			 'lensShape': 'round',
			 'lensSize': 200				 
		});		  
  }
});	

chandrantwins avatar Feb 20 '20 10:02 chandrantwins