mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
@ -180,7 +180,7 @@ export function createGesture(config: GestureConfig): Gesture {
|
|||||||
|
|
||||||
// END *************************
|
// END *************************
|
||||||
|
|
||||||
function pointerUp(ev: UIEvent) {
|
function pointerUp(ev: UIEvent | undefined) {
|
||||||
const tmpHasCaptured = hasCapturedPan;
|
const tmpHasCaptured = hasCapturedPan;
|
||||||
const tmpHasFiredStart = hasFiredStart;
|
const tmpHasFiredStart = hasFiredStart;
|
||||||
reset();
|
reset();
|
||||||
@ -206,6 +206,9 @@ export function createGesture(config: GestureConfig): Gesture {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
setDisabled(disabled: boolean) {
|
setDisabled(disabled: boolean) {
|
||||||
|
if (disabled && hasCapturedPan) {
|
||||||
|
pointerUp(undefined);
|
||||||
|
}
|
||||||
pointerEvents.setDisabled(disabled);
|
pointerEvents.setDisabled(disabled);
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
@ -215,7 +218,10 @@ export function createGesture(config: GestureConfig): Gesture {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcGestureData(detail: GestureDetail, ev: UIEvent) {
|
function calcGestureData(detail: GestureDetail, ev: UIEvent | undefined) {
|
||||||
|
if (!ev) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const prevX = detail.currentX;
|
const prevX = detail.currentX;
|
||||||
const prevY = detail.currentY;
|
const prevY = detail.currentY;
|
||||||
const prevT = detail.timeStamp;
|
const prevT = detail.timeStamp;
|
||||||
|
Reference in New Issue
Block a user