Commit f3cf277f authored by neil.fraser@gmail.com's avatar neil.fraser@gmail.com

Speed up getAllBlocksFunction.

git-svn-id: http://blockly.googlecode.com/svn/trunk@1707 c400ca83-b69d-9dd7-9705-49c6b8615e23
parent 70be1eeb
This diff is collapsed.
......@@ -231,7 +231,7 @@ Blockly.Workspace.prototype.getTopBlocks = function(ordered) {
Blockly.Workspace.prototype.getAllBlocks = function() {
var blocks = this.getTopBlocks(false);
for (var x = 0; x < blocks.length; x++) {
blocks = blocks.concat(blocks[x].getChildren());
blocks.push.apply(blocks,blocks[x].getChildren());
}
return blocks;
};
......
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