Skip to content

Commit af22907

Browse files
committed
feat(ionContent): add locking option
Closes #2034
1 parent 029f8f3 commit af22907

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/angular/directive/content.js

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @param {string=} delegate-handle The handle used to identify this scrollView
2525
* with {@link ionic.service:$ionicScrollDelegate}.
2626
* @param {string=} direction Which way to scroll. 'x' or 'y' or 'xy'. Default 'y'.
27+
* @param {boolean=} locking Whether to lock scrolling in one direction at a time. Useful to set to false when zoomed in or scrolling in two directions. Default true.
2728
* @param {boolean=} padding Whether to add padding to the content.
2829
* of the content. Defaults to true on iOS, false on Android.
2930
* @param {boolean=} scroll Whether to allow scrolling of content. Defaults to true.
@@ -112,6 +113,7 @@ function($timeout, $controller, $ionicBind) {
112113
var scrollViewOptions = {
113114
el: $element[0],
114115
delegateHandle: attr.delegateHandle,
116+
locking: (attr.locking || 'true') === 'true',
115117
bouncing: $scope.$eval($scope.hasBouncing),
116118
startX: $scope.$eval($scope.startX) || 0,
117119
startY: $scope.$eval($scope.startY) || 0,

0 commit comments

Comments
 (0)