Commit cf66b590 authored by rockyl's avatar rockyl

修复

parent 5e81e6a4
...@@ -12,6 +12,9 @@ import {afterConstructor} from "../../zeroing/decorators/after-constructor"; ...@@ -12,6 +12,9 @@ import {afterConstructor} from "../../zeroing/decorators/after-constructor";
import {injectProperties, instantiateScript, toBoolean} from "../../zeroing/utils/index"; import {injectProperties, instantiateScript, toBoolean} from "../../zeroing/utils/index";
import {isUI} from "../../zeroing/game-warpper/nodes/IUIComponent"; import {isUI} from "../../zeroing/game-warpper/nodes/IUIComponent";
import Transform from "../math/Transform"; 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 { ...@@ -288,8 +291,12 @@ export default class Container extends DisplayObject {
while (node.parent) { while (node.parent) {
let child = node; let child = node;
node = node.parent; node = node.parent;
if (skipIndexTypes.indexOf(node.instanceType) >= 0) {
} else {
let index = node.children.indexOf(child); let index = node.children.indexOf(child);
path.unshift(index); path.unshift(index);
}
if (node === untilNode) { if (node === untilNode) {
break; break;
} }
...@@ -533,7 +540,7 @@ export default class Container extends DisplayObject { ...@@ -533,7 +540,7 @@ export default class Container extends DisplayObject {
//如果不可见 //如果不可见
if (!this.visible) return null if (!this.visible) return null
//如果禁止子级的鼠标事件 //如果禁止子级的鼠标事件
if (isMouseEvent && !this.mouseChildren){ if (isMouseEvent && !this.mouseChildren) {
return this.hitTestSelf(globalPoint); return this.hitTestSelf(globalPoint);
} }
var children = this.children; var children = this.children;
......
...@@ -9,15 +9,15 @@ import {IUIComponent} from "./IUIComponent"; ...@@ -9,15 +9,15 @@ import {IUIComponent} from "./IUIComponent";
export const proxyMethods = [ export const proxyMethods = [
'onChildrenChange', 'onChildrenChange',
'addChild', 'addChild',
//'addChildAt', 'addChildAt',
//'swapChildren', 'swapChildren',
//'getChildIndex', 'getChildIndex',
//'setChildIndex', 'setChildIndex',
//'getChildAt', 'getChildAt',
//'getChildByName', 'getChildByName',
//'removeChild', 'removeChild',
//'removeChildAt', 'removeChildAt',
//'removeChildren', 'removeChildren',
]; ];
export class ScrollView extends ScrollViewBase implements IUIComponent { 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