Commit cf66b590 authored by rockyl's avatar rockyl

修复

parent 5e81e6a4
......@@ -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;
......
......@@ -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 {
......
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