Add Create, Delete, and Change events.

Not counting change for mutators.
This commit is contained in:
Neil Fraser
2016-01-20 19:11:03 -08:00
parent 36fe3994c9
commit c429949a4e
17 changed files with 209 additions and 78 deletions

View File

@@ -77,7 +77,6 @@ Blockly.Workspace.SCAN_ANGLE = 3;
*/
Blockly.Workspace.prototype.addTopBlock = function(block) {
this.topBlocks_.push(block);
this.fireChangeEvent();
};
/**
@@ -96,7 +95,6 @@ Blockly.Workspace.prototype.removeTopBlock = function(block) {
if (!found) {
throw 'Block not present in workspace\'s list of top-most blocks.';
}
this.fireChangeEvent();
};
/**
@@ -193,13 +191,6 @@ Blockly.Workspace.prototype.remainingCapacity = function() {
return this.options.maxBlocks - this.getAllBlocks().length;
};
/**
* Something on this workspace has changed.
*/
Blockly.Workspace.prototype.fireChangeEvent = function() {
// NOP.
};
/**
* Database of all workspaces.
* @private