mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Headless workspaces and blocks.
This commit is contained in:
parent
9a605e90e7
commit
0f8d01209c
40 changed files with 1894 additions and 1520 deletions
|
@ -66,7 +66,8 @@ Blockly.FieldLabel.prototype.EDITABLE = false;
|
|||
*/
|
||||
Blockly.FieldLabel.prototype.init = function(block) {
|
||||
if (this.sourceBlock_) {
|
||||
throw 'Text has already been initialized once.';
|
||||
// Text has already been initialized once.
|
||||
return;
|
||||
}
|
||||
this.sourceBlock_ = block;
|
||||
block.getSvgRoot().appendChild(this.textElement_);
|
||||
|
@ -89,7 +90,7 @@ Blockly.FieldLabel.prototype.dispose = function() {
|
|||
* Used for measuring the size and for positioning.
|
||||
* @return {!Element} The group element.
|
||||
*/
|
||||
Blockly.FieldLabel.prototype.getRootElement = function() {
|
||||
Blockly.FieldLabel.prototype.getSvgRoot = function() {
|
||||
return /** @type {!Element} */ (this.textElement_);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue