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
Rachel Fenichel
b65491e656
Heal rows when unplugging, and add tests
2018-08-03 13:54:29 -07:00
Neil Fraser
dce60fd152
Replace ReferenceError with Error.
...
Change to 4-space indentation rather than aligning with parent structure.
2018-07-11 12:20:02 -07:00
Neil Fraser
06d90c9b34
Remove goog.array
2018-07-11 12:20:02 -07:00
Neil Fraser
03bf9f5e71
Remove goog.string
2018-07-11 12:20:02 -07:00
Neil Fraser
3909bd420a
Remove all goog.asserts and goog.isXxx
...
First step to reducing Closure’s footprint.
2018-07-11 12:20:02 -07:00
Mark Gibson
709d31b729
Fix case of duplicate var (i)
2018-06-19 11:00:24 +01:00
Rachel Fenichel
f623004b3a
Small changes
2018-05-16 12:52:12 -07:00
Rachel Fenichel
a8767ee6c9
Add a referencesVariables function to field
2018-04-25 15:15:05 -07:00
Andrew n marshall
2bfff4a335
Warn if jsonInit() receives a colour attribute without a value. ( #1795 )
...
* Warn if jsonInit() receives a colour attribute without a value.
* Extract colour init code into function.
* Adding block type name to prior warnings.
2018-04-18 13:35:30 -07:00
Neil Fraser
662d79443f
Add 'ordered' option to descendant getting functions. ( #1786 )
2018-04-17 11:41:03 -07:00
Johnny Yang
6c2d63300d
mark properties @protected instead of @private so they can be used by Blockly.BlockSvg
2018-04-16 01:33:04 +10:00
Andrew n marshall
e9d8e00a55
Making all blocks use the MSG colour values. ( #1749 )
...
* Making all blocks use the MSG colour values.
* Deprecating Blockly.Constants.Lists.HUE and similar constants.
* Removing deprecated Blockly.Blocks.lists.HUE constants.
* Allowing message references in the Block.setColour() parameter.
* Adding checking of older constants, ensuring they are not overwritten.
2018-04-09 17:37:47 -07:00