polish: export draggingConnections directly

This commit is contained in:
Rachel Fenichel
2021-08-04 17:17:24 -07:00
parent 36c02120e9
commit 7bc461ea83
5 changed files with 8 additions and 31 deletions

View File

@@ -825,13 +825,11 @@ Blockly.BlockSvg.prototype.setDragging = function(adding) {
var group = this.getSvgRoot();
group.translate_ = '';
group.skew_ = '';
var newList =
Blockly.common.getDraggingConnections().concat(this.getConnections_(true));
Blockly.common.setDraggingConnections(newList);
Blockly.common.draggingConnections.push(...this.getConnections_(true));
Blockly.utils.dom.addClass(
/** @type {!Element} */ (this.svgGroup_), 'blocklyDragging');
} else {
Blockly.common.setDraggingConnections([]);
Blockly.common.draggingConnections.length = 0;
Blockly.utils.dom.removeClass(
/** @type {!Element} */ (this.svgGroup_), 'blocklyDragging');
}