Added maxTrashcanContents Property to Workspace Options (#2183)

* Added maxTrashcanContents property to workspace options.

* Changed default with trashcan to 32.
This commit is contained in:
Beka Westberg
2018-12-18 13:22:43 -08:00
committed by RoboErikG
parent 468df8749f
commit dcae85dd4f
2 changed files with 25 additions and 15 deletions

View File

@@ -54,6 +54,14 @@ Blockly.Options = function(options) {
if (hasTrashcan === undefined) {
hasTrashcan = hasCategories;
}
var maxTrashcanContents = options['maxTrashcanContents'];
if (hasTrashcan) {
if (maxTrashcanContents === undefined) {
maxTrashcanContents = 32;
}
} else {
maxTrashcanContents = 0;
}
var hasCollapse = options['collapse'];
if (hasCollapse === undefined) {
hasCollapse = hasCategories;
@@ -124,6 +132,7 @@ Blockly.Options = function(options) {
this.hasCategories = hasCategories;
this.hasScrollbars = hasScrollbars;
this.hasTrashcan = hasTrashcan;
this.maxTrashcanContents = maxTrashcanContents;
this.hasSounds = hasSounds;
this.hasCss = hasCss;
this.horizontalLayout = horizontalLayout;