Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Programmatically enable 'zooming' On ion-scroll

$
0
0

@nabi_singer wrote:

Hi,
Is there a way to programmatically enable 'zooming' attribute for ion-scroll tag? Looks like once you set it to true or false on app startup, you can not change it any more. Here is my code:

<ion-scroll direction="xy" scrollbar-x="false" scrollbar-y="false" overflow-scroll="false"
    zooming="{{enZoom}}" min-zoom="{{zoomMin}}" style="width: 100%; height: 100%"
    delegate-handle="scrollHandle{{$index}}" id="imageScoller">
        <img cache-src="..."/>
</ion-scroll>

And I have these two variables in controller:

$scope.enZoom=false;
$scope.zommMin=1;

And these are event handlers for enabling/disabling the zoom capability.

$scope.enableZoom=function(slide){
    $scope.enZoom=true;
};
$scope.disableZoom=function(slide){
    $scope.enZoom=false;
};

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>