Add undo/redo. Also refactor connections.

Bugs in undoing mutators and renaming variables.
This commit is contained in:
Neil Fraser
2016-03-03 17:48:54 -08:00
parent abd1b5c5b8
commit 2a1ffa11c4
15 changed files with 505 additions and 251 deletions

View File

@@ -82,6 +82,7 @@ Blockly.WidgetDiv.show = function(newOwner, rtl, dispose) {
Blockly.WidgetDiv.DIV.style.top = xy.y + 'px';
Blockly.WidgetDiv.DIV.style.direction = rtl ? 'rtl' : 'ltr';
Blockly.WidgetDiv.DIV.style.display = 'block';
Blockly.Events.setGroup(true);
};
/**
@@ -97,6 +98,7 @@ Blockly.WidgetDiv.hide = function() {
Blockly.WidgetDiv.dispose_ && Blockly.WidgetDiv.dispose_();
Blockly.WidgetDiv.dispose_ = null;
goog.dom.removeChildren(Blockly.WidgetDiv.DIV);
Blockly.Events.setGroup(false);
}
};