Ion-scroll pinch zoom not working in android


#1

I’m using ** ion-scroll** to allow zooming and scrolling of the image. I deployed this view to android. Scroll is working fine but i could not able to zoom the image in the app.

<ion-view view-title="zoom">
	<ion-header-bar class="bar-royal">
		<h1 class="title">zoom</h1>
	</ion-header-bar>
	
		 <ion-scroll class="scroll" zooming="true" max-zoom = "20" min-zoom= "1" direction= "xy" locking= "false"> 
			<div class="image" style="background-image: url(img/img.jpg)"> </div> 
			
		</ion-scroll>

	
</ion-view>


    .scroll{
    	width: 100%;
    	height: 100%;
    	margin: 10px;
    }

    .image{
    	width: 90%;
    	height: 90%;
    	background-size: contain;
    	background-position: center, center
    	background-repeat: no-repeat;
    }

As per the documentation and searching ion-scroll supports pinch zooming.

How can i solve this problem? Thanks!


#2

Can somebody guide me why pinch to zoom is not working?

Is there any thing wrong with control usage? or the control supports this feature?

or should i use third party tool (Hammer.js) to get this functionality.

I’m new to web world. Little guidance will be helpful.

Thanks.


#3

Add overflow-scroll=“false” in ion-scroll tag to make it work in Android