mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
Move registering objects to constructor (#3753)
This commit is contained in:
@@ -105,6 +105,22 @@ Blockly.WorkspaceSvg = function(options,
|
||||
*/
|
||||
this.markerManager_ = new Blockly.MarkerManager(this);
|
||||
|
||||
/**
|
||||
* Map from function names to callbacks, for deciding what to do when a custom
|
||||
* toolbox category is opened.
|
||||
* @type {!Object.<string, ?function(!Blockly.Workspace):!Array.<!Element>>}
|
||||
* @private
|
||||
*/
|
||||
this.toolboxCategoryCallbacks_ = {};
|
||||
|
||||
/**
|
||||
* Map from function names to callbacks, for deciding what to do when a button
|
||||
* is clicked.
|
||||
* @type {!Object.<string, ?function(!Blockly.FlyoutButton)>}
|
||||
* @private
|
||||
*/
|
||||
this.flyoutButtonCallbacks_ = {};
|
||||
|
||||
if (Blockly.Variables && Blockly.Variables.flyoutCategory) {
|
||||
this.registerToolboxCategoryCallback(Blockly.VARIABLE_CATEGORY_NAME,
|
||||
Blockly.Variables.flyoutCategory);
|
||||
@@ -374,22 +390,6 @@ Blockly.WorkspaceSvg.prototype.injectionDiv_ = null;
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.lastRecordedPageScroll_ = null;
|
||||
|
||||
/**
|
||||
* Map from function names to callbacks, for deciding what to do when a button
|
||||
* is clicked.
|
||||
* @type {!Object.<string, ?function(!Blockly.FlyoutButton)>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.flyoutButtonCallbacks_ = {};
|
||||
|
||||
/**
|
||||
* Map from function names to callbacks, for deciding what to do when a custom
|
||||
* toolbox category is opened.
|
||||
* @type {!Object.<string, ?function(!Blockly.Workspace):!Array.<!Element>>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.toolboxCategoryCallbacks_ = {};
|
||||
|
||||
/**
|
||||
* Developers may define this function to add custom menu options to the
|
||||
* workspace's context menu or edit the workspace-created set of menu options.
|
||||
|
||||
Reference in New Issue
Block a user