mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
Move icon reference to block SVG.
No functional change.
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user