Commit 5106093d authored by rockyl's avatar rockyl

优化递归效率

parent 143c6c55
......@@ -27,7 +27,9 @@ export function traverse(target: Entity, hitChild: (child: Entity, ...params) =>
interrupt = true;
continue;
}
traverse(child, hitChild, level - 1, false, fullCallback, ...params);
if(child.children.length > 0){
traverse(child, hitChild, level - 1, false, fullCallback, ...params);
}
}
}
......
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