mirror of
https://github.com/google/blockly.git
synced 2026-01-29 03:30:13 +01:00
Add Create, Delete, and Change events.
Not counting change for mutators.
This commit is contained in:
@@ -463,20 +463,6 @@ Blockly.WorkspaceSvg.prototype.highlightBlock = function(id) {
|
||||
setTimeout(function() {thisWorkspace.traceOn(true);}, 1);
|
||||
};
|
||||
|
||||
/**
|
||||
* Fire a change event for this workspace. Changes include new block, dropdown
|
||||
* edits, mutations, connections, etc. Groups of simultaneous changes (e.g.
|
||||
* a tree of blocks being deleted) are merged into one event.
|
||||
* Applications may hook workspace changes by listening for
|
||||
* 'blocklyWorkspaceChange' on workspace.getCanvas().
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.fireChangeEvent = function() {
|
||||
if (this.rendered && this.svgBlockCanvas_) {
|
||||
var details = {workspace: this.id};
|
||||
Blockly.Events.fire(details);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Paste the provided block onto the workspace.
|
||||
* @param {!Element} xmlBlock XML block element.
|
||||
@@ -691,7 +677,6 @@ Blockly.WorkspaceSvg.prototype.cleanUp_ = function() {
|
||||
}
|
||||
// Fire an event to allow scrollbars to resize.
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
this.fireChangeEvent();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user