Skip to content

Commit 7cae727

Browse files
authored
field_expandable_add.js -- revert doesnt work
1 parent 3a5f107 commit 7cae727

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

core/field_expandable_add.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -101,31 +101,6 @@ Blockly.FieldExpandableAdd.prototype.init = function() {
101101
this.boxGroup_
102102
);
103103
this.fieldGroup_.insertBefore(this.boxGroup_, this.textElement_);
104-
105-
// since this field is typicall paired with expandable_remove, no need to paste this twice
106-
// inject utility code to source block
107-
this.sourceBlock_.fillInBlock = function (connection, type, optValue) {
108-
const srcBlock = connection.sourceBlock_;
109-
if (srcBlock.isInsertionMarker_) return;
110-
111-
Blockly.Events.disable();
112-
const block = srcBlock.workspace.newBlock(type);
113-
try {
114-
if (optValue) block.setFieldValue(optValue);
115-
block.setShadow(true);
116-
if (!srcBlock.isInsertionMarker()) {
117-
block.initSvg();
118-
block.render(false);
119-
}
120-
} finally {
121-
Blockly.Events.enable();
122-
}
123-
124-
if (Blockly.Events.isEnabled()) Blockly.Events.fire(new Blockly.Events.BlockCreate(block));
125-
if (block.outputConnection) block.outputConnection.connect(connection);
126-
else block.previousConnection.connect(connection);
127-
return block;
128-
}
129104
};
130105

131106
/**

0 commit comments

Comments
 (0)