fix(scrollView): make xy scrolling work on ionScroll and ionContent

Closes #1462
This commit is contained in:
Andrew Joslin
2014-05-21 13:09:35 -06:00
parent 93e01915c2
commit 49f06f9c3d
4 changed files with 57 additions and 11 deletions

View File

@@ -10,11 +10,11 @@
*
* @param {string=} delegate-handle The handle used to identify this scrollView
* with {@link ionic.service:$ionicScrollDelegate}.
* @param {string=} direction Which way to scroll. 'x' or 'y'. Default 'y'.
* @param {string=} direction Which way to scroll. 'x' or 'y' or 'xy'. Default 'y'.
* @param {boolean=} paging Whether to scroll with paging.
* @param {expression=} on-refresh Called on pull-to-refresh, triggered by an {@link ionic.directive:ionRefresher}.
* @param {expression=} on-scroll Called whenever the user scrolls.
* @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default false.
* @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default true.
* @param {boolean=} scrollbar-y Whether to show the vertical scrollbar. Default true.
* @param {boolean=} zooming Whether to support pinch-to-zoom
* @param {integer=} min-zoom The smallest zoom amount allowed (default is 0.5)
@@ -53,6 +53,7 @@ function($timeout, $controller, $ionicBind) {
minZoom: '@',
maxZoom: '@'
});
$scope.direction = $scope.direction || 'y';
if (angular.isDefined($attr.padding)) {
$scope.$watch($attr.padding, function(newVal) {