Add UI events.

This commit is contained in:
Neil Fraser 2016-03-28 15:40:37 -07:00
parent b4218217c2
commit db7a787778
5 changed files with 69 additions and 0 deletions

View file

@ -105,6 +105,8 @@ Blockly.Warning.prototype.setVisible = function(visible) {
// No change.
return;
}
Blockly.Events.fire(
new Blockly.Events.Ui(this.block_, 'warningOpen', !visible, visible));
if (visible) {
// Create the bubble to display all warnings.
var paragraph = Blockly.Warning.textToDom_(this.getText());