Commit 37670302 authored by rockyl's avatar rockyl

修复touch阻隔的问题

parent 6feab7b4
......@@ -33,7 +33,7 @@ export default class InteractComponent extends ScillaComponent {
}
_dealGlobalTouchBegin(e) {
_dealGlobalTouchBegin(e): boolean {
let interrupt = super._dealGlobalTouchBegin(e);
const hitOn = this.hitTest(e);
......@@ -43,10 +43,10 @@ export default class InteractComponent extends ScillaComponent {
this._dealTouchOver(e);
}
return hitOn && interrupt;
return hitOn && (interrupt || this.touchInterrupt);
}
_dealGlobalTouchMove(e) {
_dealGlobalTouchMove(e): boolean {
let interrupt = super._dealGlobalTouchMove(e);
const hitOn = this.hitTest(e);
......@@ -57,10 +57,10 @@ export default class InteractComponent extends ScillaComponent {
this._dealTouchOut(e);
}
return hitOn && interrupt;
return hitOn && (interrupt || this.touchInterrupt);
}
_dealGlobalTouchEnd(e) {
_dealGlobalTouchEnd(e): boolean {
let interrupt = super._dealGlobalTouchEnd(e);
const hitOn = this.hitTest(e);
......@@ -74,7 +74,7 @@ export default class InteractComponent extends ScillaComponent {
this.isOut = true;
return hitOn && interrupt;
return hitOn && (interrupt || this.touchInterrupt);
}
_dealTouchOver(e) {
......@@ -119,7 +119,7 @@ export default class InteractComponent extends ScillaComponent {
* 碰撞检测
* @param e
*/
hitTest(e) {
hitTest(e): boolean {
const matrix = this.transform.getMatrix(false, true);
matrix.transformPoint(e.x, e.y, this.localPos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment