mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Refactored field utilities.
This commit is contained in:
@@ -376,7 +376,7 @@ Blockly.Xml.domToWorkspace = function(xml, workspace) {
|
||||
width = workspace.getWidth();
|
||||
}
|
||||
var newBlockIds = []; // A list of block IDs added by this call.
|
||||
Blockly.Field.startCache();
|
||||
Blockly.utils.dom.startTextWidthCache();
|
||||
// Safari 7.1.3 is known to provide node lists with extra references to
|
||||
// children beyond the lists' length. Trust the length, do not use the
|
||||
// looping pattern of checking the index for an object.
|
||||
@@ -433,7 +433,7 @@ Blockly.Xml.domToWorkspace = function(xml, workspace) {
|
||||
if (!existingGroup) {
|
||||
Blockly.Events.setGroup(false);
|
||||
}
|
||||
Blockly.Field.stopCache();
|
||||
Blockly.utils.dom.stopTextWidthCache();
|
||||
}
|
||||
// Re-enable workspace resizing.
|
||||
if (workspace.setResizesEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user