mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
add a few type definitions
This commit is contained in:
parent
966cda6088
commit
ad3541992e
2 changed files with 8 additions and 1 deletions
|
@ -148,7 +148,10 @@ Blockly.Toolbox.prototype.init = function() {
|
|||
var workspace = this.workspace_;
|
||||
var svg = this.workspace_.getParentSvg();
|
||||
|
||||
// Create an HTML container for the Toolbox menu.
|
||||
/**
|
||||
* HTML container for the Toolbox menu.
|
||||
* @type {Element}
|
||||
*/
|
||||
this.HtmlDiv =
|
||||
goog.dom.createDom(goog.dom.TagName.DIV, 'blocklyToolboxDiv');
|
||||
this.HtmlDiv.setAttribute('dir', workspace.RTL ? 'RTL' : 'LTR');
|
||||
|
|
|
@ -254,6 +254,10 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
|
|||
// Determine if there needs to be a category tree, or a simple list of
|
||||
// blocks. This cannot be changed later, since the UI is very different.
|
||||
if (this.options.hasCategories) {
|
||||
/**
|
||||
* @type {Blockly.Toolbox}
|
||||
* @private
|
||||
*/
|
||||
this.toolbox_ = new Blockly.Toolbox(this);
|
||||
} else if (this.options.languageTree) {
|
||||
this.addFlyout_();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue