mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Make insertion markers match the size of the source block
This commit is contained in:
@@ -271,6 +271,17 @@ Blockly.InsertionMarkerManager.prototype.createMarkerBlock_ = function(sourceBlo
|
||||
result.domToMutation(oldMutationDom);
|
||||
}
|
||||
}
|
||||
// Copy field values from the other block. These values may impact the
|
||||
// rendered size of the insertion marker. Note that we do not care about
|
||||
// child blocks here.
|
||||
for (var i = 0; i < sourceBlock.inputList.length; i++) {
|
||||
var input = sourceBlock.inputList[i];
|
||||
for (var j = 0; j < input.fieldRow.length; j++) {
|
||||
var field = input.fieldRow[j];
|
||||
result.setFieldValue(field.getValue(), field.name);
|
||||
}
|
||||
}
|
||||
|
||||
result.initSvg();
|
||||
result.getSvgRoot().setAttribute('visibility', 'hidden');
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user