Skip to content

Commit

Permalink
修复节点名字一直,插件检测不出来的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tidys committed Jan 20, 2018
1 parent 4bdf589 commit 89e5959
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CocosCreatorInspector/src/dev/injectScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export default function () {

// 收集节点信息
function getNodeChildren(node, data) {
let nodeName = node.name;
let uuid = node.uuid;
// console.log("nodeName: " + nodeName);
data[nodeName] = {
data[uuid] = {
uuid: node.uuid,
name: nodeName,
name: node.name,
x: node.x,
y: node.y,
zIndex: node.zIndex,
Expand All @@ -49,7 +49,7 @@ export default function () {
let childItem = nodeChildren[i];
// let childName = childItem.name;
// console.log("childName: " + childName);
getNodeChildren(childItem, data[nodeName].children);
getNodeChildren(childItem, data[uuid].children);
}

}
Expand Down

0 comments on commit 89e5959

Please sign in to comment.