Added Max Instances Property to Workspace Options (#2130)

* Added Max Instances property to Blocks

* eslint cleanup

* eslint cleanup 2

* Moved maxInstances property from block to workspace (as a map of block type to max instances). isDuplicate() changed to correctly handle siblings/branches.

* eslint cleanup

* Changed checking types to map. Added hasBlockLimits. Fixed Nits.

* Added limit_instances test block. eslint fixes.

* fixup! Added limit_instances test block. eslint fixes.

* Changed sorting objects to a private static function of the workspace. Fixed nits. Undeleted .eslintrc

* Reverted .gitignore file.

* Added getBlockTypeCounts() to utils. Added isCapacityAvailable() to workspace. Changed clipboard to save typeCountsMap rather than object.
This commit is contained in:
BeksOmega
2018-11-27 16:34:21 -08:00
committed by RoboErikG
parent 6169a6488f
commit 1c4ba38300
10 changed files with 221 additions and 35 deletions

2
.gitignore vendored
View File

@@ -11,4 +11,4 @@ npm-debug.log
tests/compile/main_compressed.js
tests/compile/*compiler*.jar
local_build/*compiler*.jar
local_build/local_blockly_compressed.js
local_build/local_blockly_compressed.js