Beka Westberg
0872d022e1
Changed utils.fields -> fieldRegistry. Also removed useless tooltip requires.
2019-08-16 09:57:28 -07:00
Beka Westberg
cdc90f4059
Refactored field utilities.
2019-08-16 09:57:27 -07:00
Sam El-Husseini
174fe53516
Minor jsdoc issue ( #2826 )
...
The JavaScript closure compiler barfs at this. No such thing as JSDOC @throw.
2019-08-14 14:40:54 -07:00
Beka Westberg
654467e9ac
Added disposed = false properties to fields, connections, and blocks. Changed applicable unit tests from isNotOk -> isFalse.
2019-08-07 07:17:41 -07:00
Beka Westberg
6f03634730
Moved disposed into finally block.
2019-08-07 07:11:17 -07:00
Beka Westberg
057cee51f8
Added disposed property to blocks (for use in unit tests).
2019-08-07 07:07:30 -07:00
Beka Westberg
8921fa96a9
Removed redundant connection disposal code from block.
2019-08-07 07:07:30 -07:00
Neil Fraser
45e5fb4157
More JSDoc and lint corrections
2019-07-30 17:00:40 -07:00
Neil Fraser
6aedfab4d1
Misc JSDoc fixes. ( #2747 )
2019-07-30 16:28:48 -07:00
Beka Westberg
3d813803ca
updateVariableName -> refreshVariableName
2019-07-26 12:55:43 -07:00
Beka Westberg
20837da54f
Deprecated field setText function.
2019-07-19 08:57:34 -07:00
Beka Westberg
f873ddb1c6
Added Field Tooltip Support to the JSON ( #2657 )
...
* Added support for setting a field's tooltip via JSON.
* Added a test block to the playground.
2019-07-18 12:21:37 -07:00
Neil Fraser
a9fdf7844a
Fix ordering of requires
...
Search and replace of a name strikes again.
2019-06-07 10:32:57 -07:00
Neil Fraser
d1a29739d8
Move utilities into own directory.
...
TODO: There are more functions which may be migrated into dom and string.
2019-06-07 10:32:57 -07:00
Neil Fraser
5bf7069a2f
Remove goog.math.Coordinate
2019-06-07 10:32:57 -07:00
Neil Fraser
069423e7cd
Remove last traces of goog.color.
2019-06-05 16:41:04 -07:00
Neil Fraser
ed9330cf57
Move Blockly.hueToRgb to Blockly.utils.colour
...
Also adds support for ‘#f00’, ‘rgb(255, 0, 0)’ and ‘red’ for block colours, in addition to ‘#ff0000’ (and of course hue).
2019-06-05 16:41:04 -07:00
Neil Fraser
dce0b77424
Fix 19 warnings in theme-related code. ( #2523 )
...
* Fix 19 warnings in theme-related code.
Resolves #2414
* Remove suppressPrefixSuffix property definition
The mixin code throws an error if property exists on both objects.
* eslint has strange ideas about indentation.
2019-05-30 10:05:06 -07:00
Neil Fraser
9f528922a7
Fix some dependencies
2019-05-24 15:45:05 -07:00
Beka Westberg
247aafae7e
Added updateColour to field.
2019-04-29 16:53:59 -07:00
Jim Jiang
1b10d134a5
Add Block.setEnabled ( #2386 )
...
* Implement Block.setEnabled()
From issue #1593 . This commit:
- add setEnabled
- deprecate setDisabled
* Update setDisabled calls to setEnabled
Add setEnabled and deprecate setDisabled in
- core/block_svg
Update calls in
- blocks/loops
- blocks/procedures
- core/block_events
- core/events
- core/flyout_base
- core/xml
- tests/workplace_svg/procedure_svg_test
* Implement changes from comments from RoboErikG
- Implement isEnabled()
- Make this.disabled @private
- Make setDisabled(disabled) call setEnabled(!disabled)
- Update setEnabled to use isEnabled()
* Utilize isEnabled() and fix typos
Fix missing parentheses
Implement isEnabled() more widely
Fix lint and parentheses errors
* Change prevDisabledState to prevEnabledState
2019-04-23 08:49:07 -07:00
alschmiedt
1034ba835c
Adds check for a targetConnection
2019-04-02 14:42:41 -07:00
Neil Fraser
e9de083361
Fix @return JSDocs.
2019-03-29 15:24:37 -07:00
Neil Fraser
405b1e4e78
Lint issues found while debugging.
2019-03-27 15:47:29 -07:00
Andrew n marshall
f05eed64eb
Check against healing child shadow blocks.
...
Fixes #2227 , healing values.
Also applies to shadow next blocks.
Added a playground test block group with a shadow statement.
2019-02-07 13:15:41 -08:00
alschmiedt
58c365e377
Changes colour names
2019-02-06 14:24:41 -08:00
alschmiedt
d747bb080a
Access colours using bracket notation
2019-01-19 11:53:09 -08:00
alschmiedt
af35702f3e
Final fixes
2019-01-10 12:04:47 -08:00
alschmiedt
9bfb30bcf2
Fixing review comments
2019-01-10 09:13:02 -08:00
alschmiedt
caf664db04
Small fixes
2019-01-09 15:38:30 -08:00
alschmiedt
55a46f8299
Fixes error thrown for style defined inline
2019-01-09 13:44:22 -08:00
alschmiedt
bac9a16da0
Adds hat style
2019-01-08 15:13:00 -08:00
alschmiedt
f480b1ff79
Changes Blockly style to be Blockly theme.
2019-01-08 11:40:57 -08:00
alschmiedt
1f742bf83d
Fixing review comments
2019-01-07 10:38:49 -08:00
alschmiedt
1b3955d9d6
Fixing review comments
2018-12-21 07:52:50 -08:00
alschmiedt
ebe8492d3d
Add error message for when style is not set
2018-12-20 09:04:45 -08:00
alschmiedt
9afe497b7e
Fixes jsdocs
2018-12-19 08:45:20 -08:00
alschmiedt
b9efa72161
Small cleanup
2018-12-18 14:05:44 -08:00
alschmiedt
2481274406
Small cleanup
2018-12-18 13:36:23 -08:00
alschmiedt
be78838335
Allows user to define style name using variables in json
2018-12-18 10:50:49 -08:00
alschmiedt
4918da9538
Adds ability to provide a hue value for primary colour
2018-12-12 11:39:23 -08:00
alschmiedt
56c2e5fc31
Initial commit for adding a style
2018-12-11 13:22:25 -08:00
BeksOmega
1c4ba38300
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.
2018-11-27 16:34:21 -08:00
Neil Fraser
db0dbc69ee
Update todos and requires.
2018-10-16 11:34:10 -07:00
Neil Fraser
aa09ad9175
Line wrap at 80.
2018-10-16 11:34:10 -07:00
Rachel Fenichel
870e95a255
Fix inconsistent return type warning
2018-09-25 14:22:12 -07:00
Rachel Fenichel
a0e90627f7
Add some functions for insertion markers
2018-09-13 15:55:49 -07:00
Andrew n marshall
b8a1873f01
Converting bad block warning into an error.
2018-08-31 12:42:38 -07:00
Rachel Fenichel
b89487e332
Ignore whether parent has multiple inputs
2018-08-06 11:18:00 -07:00
Rachel Fenichel
a8d52903e2
update comment with todo
2018-08-06 10:29:12 -07:00