Commit 5106093d authored by rockyl's avatar rockyl

优化递归效率

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