Commit c82c460d authored by Neil Fraser's avatar Neil Fraser

Move icon reference to block SVG.

No functional change.
parent 7db8ce94
......@@ -508,12 +508,6 @@ Blockly.Block.prototype.setEditable = function(editable) {
field.updateEditable();
}
}
if (this.rendered) {
var icons = this.getIcons();
for (var i = 0; i < icons.length; i++) {
icons[i].updateEditable();
}
}
};
/**
......
......@@ -789,6 +789,19 @@ Blockly.BlockSvg.prototype.setMovable = function(movable) {
this.updateMovable();
};
/**
* Set whether this block is editable or not.
* @param {boolean} movable True if editable.
*/
Blockly.BlockSvg.prototype.setEditable = function(editable) {
Blockly.BlockSvg.superClass_.setEditable.call(this, editable);
if (this.rendered) {
for (var i = 0; i < this.icons_.length; i++) {
this.icons_[i].updateEditable();
}
}
};
/**
* Return the root node of the SVG or null if none exists.
* @return {Element} The root SVG node (probably a group).
......
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