Commit f2983a12 authored by 任建锋's avatar 任建锋

--

parent c75ff988
...@@ -21680,9 +21680,8 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -21680,9 +21680,8 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
}; };
EditorStage.prototype.getNode = function (nodePath, origin) { EditorStage.prototype.getNode = function (nodePath, origin) {
if (origin === void 0) { origin = false; } if (origin === void 0) { origin = false; }
if (!this._view) { if (!this._view)
return; return;
}
var node = this._view.getChildByIndexPath(nodePath); var node = this._view.getChildByIndexPath(nodePath);
if (node) { if (node) {
if (origin) { if (origin) {
...@@ -21752,6 +21751,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -21752,6 +21751,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
globalPos.x *= devicePixelRatio; globalPos.x *= devicePixelRatio;
globalPos.y *= devicePixelRatio; globalPos.y *= devicePixelRatio;
var node = this.hitTestPoint(globalPos, true); var node = this.hitTestPoint(globalPos, true);
console.log(globalPos.x, globalPos.y, node ? node.name : '');
return node; return node;
}; };
return EditorStage; return EditorStage;
......
This diff is collapsed.
...@@ -61,9 +61,7 @@ export class EditorStage extends Node { ...@@ -61,9 +61,7 @@ export class EditorStage extends Node {
} }
getNode(nodePath, origin = false): any { getNode(nodePath, origin = false): any {
if(!this._view){ if(!this._view)return
return
}
let node = this._view.getChildByIndexPath(nodePath); let node = this._view.getChildByIndexPath(nodePath);
if (node) { if (node) {
if (origin) { if (origin) {
...@@ -149,7 +147,7 @@ export class EditorStage extends Node { ...@@ -149,7 +147,7 @@ export class EditorStage extends Node {
let node = this.hitTestPoint(globalPos, true); let node = this.hitTestPoint(globalPos, true);
// console.log(globalPos.x, globalPos.y, node ? node.name : ''); console.log(globalPos.x, globalPos.y, node ? node.name : '');
return node; return node;
} }
......
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