mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
fix annotations and rename
This commit is contained in:
parent
4230dd2b83
commit
b4256247fb
2 changed files with 11 additions and 13 deletions
|
@ -81,10 +81,9 @@ Blockly.Toolbox = function(workspace) {
|
||||||
/**
|
/**
|
||||||
* Configuration constants for Closure's tree UI.
|
* Configuration constants for Closure's tree UI.
|
||||||
* @type {Object.<string,*>}
|
* @type {Object.<string,*>}
|
||||||
* @const
|
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.CONFIG_ = {
|
this.config_ = {
|
||||||
indentWidth: 19,
|
indentWidth: 19,
|
||||||
cssRoot: 'blocklyTreeRoot',
|
cssRoot: 'blocklyTreeRoot',
|
||||||
cssHideRoot: 'blocklyHidden',
|
cssHideRoot: 'blocklyHidden',
|
||||||
|
@ -101,22 +100,21 @@ Blockly.Toolbox = function(workspace) {
|
||||||
/**
|
/**
|
||||||
* Configuration constants for tree separator.
|
* Configuration constants for tree separator.
|
||||||
* @type {Object.<string,*>}
|
* @type {Object.<string,*>}
|
||||||
* @const
|
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.TREE_SEPARATOR_CONFIG_ = {
|
this.treeSeparatorConfig_ = {
|
||||||
cssTreeRow: 'blocklyTreeSeparator'
|
cssTreeRow: 'blocklyTreeSeparator'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.horizontalLayout_) {
|
if (this.horizontalLayout_) {
|
||||||
this.CONFIG_['cssTreeRow'] =
|
this.config_['cssTreeRow'] =
|
||||||
this.CONFIG_['cssTreeRow'] +
|
this.config_['cssTreeRow'] +
|
||||||
(workspace.RTL ? ' blocklyHorizontalTreeRtl' : ' blocklyHorizontalTree');
|
(workspace.RTL ? ' blocklyHorizontalTreeRtl' : ' blocklyHorizontalTree');
|
||||||
|
|
||||||
this.TREE_SEPARATOR_CONFIG_['cssTreeRow'] =
|
this.treeSeparatorConfig_['cssTreeRow'] =
|
||||||
'blocklyTreeSeparatorHorizontal' +
|
'blocklyTreeSeparatorHorizontal' +
|
||||||
(workspace.RTL ? ' blocklyHorizontalTreeRtl' : ' blocklyHorizontalTree');
|
(workspace.RTL ? ' blocklyHorizontalTreeRtl' : ' blocklyHorizontalTree');
|
||||||
this.CONFIG_['cssTreeIcon'] = '';
|
this.config_['cssTreeIcon'] = '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -185,10 +183,10 @@ Blockly.Toolbox.prototype.init = function() {
|
||||||
this.flyout_.init(workspace);
|
this.flyout_.init(workspace);
|
||||||
this.flyout_.hide();
|
this.flyout_.hide();
|
||||||
|
|
||||||
this.CONFIG_['cleardotPath'] = workspace.options.pathToMedia + '1x1.gif';
|
this.config_['cleardotPath'] = workspace.options.pathToMedia + '1x1.gif';
|
||||||
this.CONFIG_['cssCollapsedFolderIcon'] =
|
this.config_['cssCollapsedFolderIcon'] =
|
||||||
'blocklyTreeIconClosed' + (this.RTL ? 'Rtl' : 'Ltr');
|
'blocklyTreeIconClosed' + (this.RTL ? 'Rtl' : 'Ltr');
|
||||||
var tree = new Blockly.Toolbox.TreeControl(this, this.CONFIG_);
|
var tree = new Blockly.Toolbox.TreeControl(this, this.config_);
|
||||||
this.tree_ = tree;
|
this.tree_ = tree;
|
||||||
tree.setShowRootNode(false);
|
tree.setShowRootNode(false);
|
||||||
tree.setShowLines(false);
|
tree.setShowLines(false);
|
||||||
|
@ -320,9 +318,9 @@ Blockly.Toolbox.prototype.populate_ = function(newTree) {
|
||||||
// Separator between two categories.
|
// Separator between two categories.
|
||||||
// <sep></sep>
|
// <sep></sep>
|
||||||
if (that.horizontalLayout_) {
|
if (that.horizontalLayout_) {
|
||||||
treeOut.add(new Blockly.Toolbox.TreeSeparator(that.TREE_SEPARATOR_CONFIG_));
|
treeOut.add(new Blockly.Toolbox.TreeSeparator(that.treeSeparatorConfig_));
|
||||||
} else {
|
} else {
|
||||||
treeOut.addChildAt(new Blockly.Toolbox.TreeSeparator(that.TREE_SEPARATOR_CONFIG_),
|
treeOut.addChildAt(new Blockly.Toolbox.TreeSeparator(that.treeSeparatorConfig_),
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue