mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Migrate selected from Blockly to Blockly.common (#5489)
* Add getSelected/setSelected to core/common.js * Migrate core to use Blockly.common.getSelected/setSelected instead of Blockly.selected * Migrate demos to use Blockly.common.getSelected/setSelected instead of Blockly.selected * Remove Blockly.selected * Use variable instead of calling common.getSelected() multiple times * Add accessor for selected on Blockly * Add renaming record for Blockly.selected -> Blockly.common.getSelected/setSelected
This commit is contained in:
@@ -30,6 +30,7 @@ const RenderedConnection = goog.requireType('Blockly.RenderedConnection');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
const blockAnimations = goog.require('Blockly.blockAnimations');
|
||||
const common = goog.require('Blockly.common');
|
||||
const connectionTypes = goog.require('Blockly.connectionTypes');
|
||||
const constants = goog.require('Blockly.constants');
|
||||
const internalConstants = goog.require('Blockly.internalConstants');
|
||||
@@ -43,7 +44,7 @@ const internalConstants = goog.require('Blockly.internalConstants');
|
||||
* @constructor
|
||||
*/
|
||||
const InsertionMarkerManager = function(block) {
|
||||
Blockly.selected = block;
|
||||
common.setSelected(block);
|
||||
|
||||
/**
|
||||
* The top block in the stack being dragged.
|
||||
|
||||
Reference in New Issue
Block a user