mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
polish: export draggingConnections directly
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user