mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(): rename progressFinish to progressEnd
This commit is contained in:
@@ -30,7 +30,7 @@ class MenuContentGesture extends SlideEdgeGesture {
|
||||
|
||||
onSlideEnd(slide, ev) {
|
||||
let shouldComplete = (Math.abs(ev.velocityX) > 0.2 || Math.abs(slide.delta) > Math.abs(slide.max) * 0.5);
|
||||
this.menu.setProgressFinish(shouldComplete);
|
||||
this.menu.setProgressEnd(shouldComplete);
|
||||
}
|
||||
|
||||
getElementStartPos(slide, ev) {
|
||||
|
||||
@@ -49,7 +49,7 @@ export class MenuType {
|
||||
this.seek.progress(value);
|
||||
}
|
||||
|
||||
setProgressFinish(shouldComplete) {
|
||||
setProgressEnd(shouldComplete) {
|
||||
let resolve;
|
||||
let promise = new Promise(res => { resolve = res });
|
||||
|
||||
@@ -58,7 +58,7 @@ export class MenuType {
|
||||
isOpen = true;
|
||||
}
|
||||
|
||||
this.seek.progressFinish(shouldComplete).then(() => {
|
||||
this.seek.progressEnd(shouldComplete).then(() => {
|
||||
this.isOpening = false;
|
||||
resolve(isOpen);
|
||||
});
|
||||
|
||||
@@ -140,11 +140,11 @@ export class Menu extends Ion {
|
||||
this._type.setProgess(value);
|
||||
}
|
||||
|
||||
setProgressFinish(shouldComplete) {
|
||||
setProgressEnd(shouldComplete) {
|
||||
// user has finished dragging the menu
|
||||
this._disable();
|
||||
this.app.setEnabled(false);
|
||||
this._type.setProgressFinish(shouldComplete).then(isOpen => {
|
||||
this._type.setProgressEnd(shouldComplete).then(isOpen => {
|
||||
this._after(isOpen);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export class SwipeBackGesture extends SlideEdgeGesture {
|
||||
let shouldComplete = (Math.abs(ev.velocityX) > 0.2 || Math.abs(slide.delta) > Math.abs(slide.max) * 0.5);
|
||||
|
||||
// TODO: calculate a better playback rate depending on velocity and distance
|
||||
this.viewCtrl.swipeBackFinish(shouldComplete, 1);
|
||||
this.viewCtrl.swipeBackEnd(shouldComplete, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -377,13 +377,13 @@ export class ViewController extends Ion {
|
||||
* @param {TODO} completeSwipeBack Should the swipe back complete or not.
|
||||
* @param {number} rate How fast it closes
|
||||
*/
|
||||
swipeBackFinish(completeSwipeBack, rate) {
|
||||
swipeBackEnd(completeSwipeBack, rate) {
|
||||
if (!this._sbTrans) return;
|
||||
|
||||
// disables the app during the transition
|
||||
this.app.setEnabled(false);
|
||||
|
||||
this._sbTrans.progressFinish(completeSwipeBack, rate).then(() => {
|
||||
this._sbTrans.progressEnd(completeSwipeBack, rate).then(() => {
|
||||
|
||||
this.zone.run(() => {
|
||||
// find the items that were entering and leaving
|
||||
|
||||
Reference in New Issue
Block a user