Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scilla-components
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
scilla-components
Commits
37670302
Commit
37670302
authored
Apr 11, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复touch阻隔的问题
parent
6feab7b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
InteractComponent.ts
src/base/InteractComponent.ts
+7
-7
No files found.
src/base/InteractComponent.ts
View file @
37670302
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment