Programmatically enable 'zooming' On ion-scroll


#1

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;
};

#2

like you see here:
https://github.com/driftyco/ionic/blob/master/js/angular/directive/scroll.js#L65

the bindings are using @-Bindings --> so you can only set initial values.


#3

So, nothing? Do you have any other suggestions or hack fixes in mind?


#4

Also looking for a suggestion to either disable zooming programmatically or an appropriate hack if possible?