mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat($ionicScrollDelegate): expose zoomBy and zoomTo methods
Closes #1977
This commit is contained in:
12
js/angular/controller/scrollController.js
vendored
12
js/angular/controller/scrollController.js
vendored
@@ -140,6 +140,18 @@ function($scope, scrollViewOptions, $timeout, $window, $$scrollValueCache, $loca
|
||||
});
|
||||
};
|
||||
|
||||
this.zoomTo = function(zoom, shouldAnimate, originLeft, originTop) {
|
||||
this.resize().then(function() {
|
||||
scrollView.zoomTo(zoom, !!shouldAnimate, originLeft, originTop);
|
||||
});
|
||||
};
|
||||
|
||||
this.zoomBy = function(zoom, shouldAnimate, originLeft, originTop) {
|
||||
this.resize().then(function() {
|
||||
scrollView.zoomBy(zoom, !!shouldAnimate, originLeft, originTop);
|
||||
});
|
||||
};
|
||||
|
||||
this.scrollBy = function(left, top, shouldAnimate) {
|
||||
this.resize().then(function() {
|
||||
scrollView.scrollBy(left, top, !!shouldAnimate);
|
||||
|
||||
Reference in New Issue
Block a user