mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
refactor: move properties into constructors and convert to classes (#5822)
* refactor: move properties to constructor in block_drag_surface.js * refactor: move properties to constructor in block_svg.js * refactor: move properties to constructor in block.js * refactor: move properties to constructor in bubble.js * refactor: move properties to constructor in connection.js * refactor: move properties to constructor in flyout_base.js * refactor: move properties to constructor in flyout_button.js * refactor: move properties to constructor in generator.js * refactor: move properties to constructor in grid.js * refactor: move properties to constructor in input.js * refactor: move properties to constructor in mutator.js * refactor: move properties to constructor in scrollbar.js * refactor: move properties to constructor in trashcan.js * refactor: move properties to constructor in warning.js * refactor: move properties to constructor in workspace_audio.js * refactor: move properties to constructor in workspace_drag_surface_svg.js * refactor: move properties to constructor in workspace_svg.js * refactor: move properties to constructor in workspace.js * refactor: move properties to constructor in zoom_controls.js * chore: rebuild * refactor: convert zoom_controls.js to es6 class and format * refactor: convert workspace_audio.js to es6 class and format * refactor: convert workspace_dragger.js to es6 class and format * refactor: convert workspace_drag_surface_svg.js to es6 class and format * refactor: convert variable_model.js to es6 class and format * refactor: convert variable_map.js to es6 class and format * refactor: convert theme.js to es6 class and format * chore: remove bad comment
This commit is contained in:
@@ -72,6 +72,33 @@ const Workspace = function(opt_options) {
|
||||
/** @type {toolbox.Position} */
|
||||
this.toolboxPosition = this.options.toolboxPosition;
|
||||
|
||||
/**
|
||||
* Returns `true` if the workspace is visible and `false` if it's headless.
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.rendered = false;
|
||||
|
||||
/**
|
||||
* Returns `true` if the workspace is currently in the process of a bulk
|
||||
* clear.
|
||||
* @type {boolean}
|
||||
* @package
|
||||
*/
|
||||
this.isClearing = false;
|
||||
|
||||
/**
|
||||
* Maximum number of undo events in stack. `0` turns off undo, `Infinity` sets
|
||||
* it to unlimited.
|
||||
* @type {number}
|
||||
*/
|
||||
this.MAX_UNDO = 1024;
|
||||
|
||||
/**
|
||||
* Set of databases for rapid lookup of connection locations.
|
||||
* @type {Array<!ConnectionDB>}
|
||||
*/
|
||||
this.connectionDBList = null;
|
||||
|
||||
const connectionCheckerClass = registry.getClassFromOptions(
|
||||
registry.Type.CONNECTION_CHECKER, this.options, true);
|
||||
/**
|
||||
@@ -143,32 +170,6 @@ const Workspace = function(opt_options) {
|
||||
this.potentialVariableMap_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns `true` if the workspace is visible and `false` if it's headless.
|
||||
* @type {boolean}
|
||||
*/
|
||||
Workspace.prototype.rendered = false;
|
||||
|
||||
/**
|
||||
* Returns `true` if the workspace is currently in the process of a bulk clear.
|
||||
* @type {boolean}
|
||||
* @package
|
||||
*/
|
||||
Workspace.prototype.isClearing = false;
|
||||
|
||||
/**
|
||||
* Maximum number of undo events in stack. `0` turns off undo, `Infinity` sets
|
||||
* it to unlimited.
|
||||
* @type {number}
|
||||
*/
|
||||
Workspace.prototype.MAX_UNDO = 1024;
|
||||
|
||||
/**
|
||||
* Set of databases for rapid lookup of connection locations.
|
||||
* @type {Array<!ConnectionDB>}
|
||||
*/
|
||||
Workspace.prototype.connectionDBList = null;
|
||||
|
||||
/**
|
||||
* Dispose of this workspace.
|
||||
* Unlink from all DOM elements to prevent memory leaks.
|
||||
|
||||
Reference in New Issue
Block a user