Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-engine
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
劳工
zeroing-engine
Commits
cf66b590
Commit
cf66b590
authored
Jun 22, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
5e81e6a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
113 deletions
+120
-113
Container.ts
src/2d/display/Container.ts
+111
-104
ScrollView.ts
src/zeroing/game-warpper/nodes/ScrollView.ts
+9
-9
No files found.
src/2d/display/Container.ts
View file @
cf66b590
...
...
@@ -12,6 +12,9 @@ import {afterConstructor} from "../../zeroing/decorators/after-constructor";
import
{
injectProperties
,
instantiateScript
,
toBoolean
}
from
"../../zeroing/utils/index"
;
import
{
isUI
}
from
"../../zeroing/game-warpper/nodes/IUIComponent"
;
import
Transform
from
"../math/Transform"
;
import
{
ScrollView
}
from
"../../zeroing/game-warpper/nodes/ScrollView"
;
const
skipIndexTypes
=
[
'ScrollView'
,
'ScrollList'
];
/**
* 容器类
...
...
@@ -288,8 +291,12 @@ export default class Container extends DisplayObject {
while
(
node
.
parent
)
{
let
child
=
node
;
node
=
node
.
parent
;
if
(
skipIndexTypes
.
indexOf
(
node
.
instanceType
)
>=
0
)
{
}
else
{
let
index
=
node
.
children
.
indexOf
(
child
);
path
.
unshift
(
index
);
}
if
(
node
===
untilNode
)
{
break
;
}
...
...
@@ -533,7 +540,7 @@ export default class Container extends DisplayObject {
//如果不可见
if
(
!
this
.
visible
)
return
null
//如果禁止子级的鼠标事件
if
(
isMouseEvent
&&
!
this
.
mouseChildren
){
if
(
isMouseEvent
&&
!
this
.
mouseChildren
)
{
return
this
.
hitTestSelf
(
globalPoint
);
}
var
children
=
this
.
children
;
...
...
src/zeroing/game-warpper/nodes/ScrollView.ts
View file @
cf66b590
...
...
@@ -9,15 +9,15 @@ import {IUIComponent} from "./IUIComponent";
export
const
proxyMethods
=
[
'onChildrenChange'
,
'addChild'
,
//
'addChildAt',
//
'swapChildren',
//
'getChildIndex',
//
'setChildIndex',
//
'getChildAt',
//
'getChildByName',
//
'removeChild',
//
'removeChildAt',
//
'removeChildren',
'addChildAt'
,
'swapChildren'
,
'getChildIndex'
,
'setChildIndex'
,
'getChildAt'
,
'getChildByName'
,
'removeChild'
,
'removeChildAt'
,
'removeChildren'
,
];
export
class
ScrollView
extends
ScrollViewBase
implements
IUIComponent
{
...
...
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