Andrew n marshall
42e229fb4c
Removing Blockly.utils.getScale_() and usage. ( #1821 )
...
The function only returns 1 for the two cases it was used on,
making the scale multiplication a no-op.
2018-04-24 10:24:03 -07:00
Rachel Fenichel
4a467cef5b
Move events back up to core, because moving it to a separate folder was a mistake.
2018-04-19 16:53:19 -07:00
Rachel Fenichel
5839620a43
Remove unnecessary conditionals.
2018-04-19 16:15:00 -07:00
Rachel Fenichel
d8202f8cae
Create base classes for block and variable events, instead of stuffing everything into Abstract
2018-04-19 16:15:00 -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
Rachel Fenichel
46da00dbd3
Merge pull request #1787 from rachel-fenichel/feature/block_animations
...
Move block animation code to a new file and rebuild
2018-04-18 10:17:43 -07:00
Andrew n marshall
1a37bebd89
Refactor of checkBlockColourConstant_() ( #1798 )
...
Rewrote Blockly.checkBlockColourConstant_(..).
* Last argument is now the expected value of the constant (replacing
the `removed` argument). The prevents warnings when a Msg colour
constant is overridden (the correct way).
* If a value for the constant is not found, do not warn (#1790 ).
2018-04-18 08:40:45 -07:00
Neil Fraser
662d79443f
Add 'ordered' option to descendant getting functions. ( #1786 )
2018-04-17 11:41:03 -07:00
Rachel Fenichel
100af3836d
Fix #1788
2018-04-16 16:42:18 -07:00
Rachel Fenichel
4e3b114832
Move block animation code to a new file and rebuild
2018-04-16 15:28:52 -07:00
Johnny Yang
7dbe0bda66
mark properties @protected instead of @private so they can be used by Blockly.FlyoutVertical & Blockly.FlyoutHorizontal
2018-04-16 01:36:28 +10:00
Johnny Yang
419fe9e8a5
mark properties @protected instead of @private so they can be used by Blockly.RenderedConnection
2018-04-16 01:34:52 +10: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
Rachel Fenichel
1dfb53b337
Fix comment
2018-04-13 13:39:28 -07:00
Rachel Fenichel
23666664fa
Fix context menus on blocks with variables
2018-04-12 16:56:07 -07:00
Rachel Fenichel
df3e826087
Merge pull request #1774 from rachel-fenichel/bugfix/1425
...
Work around a problem with RTL mutators
2018-04-12 13:30:35 -07:00
Rachel Fenichel
01e48608fb
Fix my definition of plausible
2018-04-11 18:08:49 -07:00
Rachel Fenichel
6606c7c6fc
Fix excess newlines
2018-04-11 17:08:18 -07:00
Rachel Fenichel
40e74d4d65
Check if the browser's value was plausible, and use it if so.
2018-04-11 17:00:39 -07:00
Neil Fraser
1d385f8d69
Require goog.userAgent in the correct files.
2018-04-11 16:59:35 -07:00
Rachel Fenichel
29571e91e2
Work around a problem with RTL mutators
2018-04-11 16:17:06 -07:00
Andrew n marshall
ecc41372d7
Fixing issue 1760: nulls in JSON array for block definitions. ( #1768 )
...
JSON array with null or undefined value will now skip the offending item, and proceed to load following items. Added tests for null and undefined array elements.
* Testing handling null and undefined id in block definition.
* Adding test utility function to capture console warnings.
* Test assumption that creating a simple block will not cause a warning. This is assumed when later checking warning counts.
2018-04-11 10:22:30 -07: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
Rachel Fenichel
52e0241f66
Add argsIgnorePattern to the eslintrc
2018-04-06 13:29:22 -07:00
Rachel Fenichel
bd42a09f31
Merge pull request #1763 from rachel-fenichel/feature/goto_block
...
Add a function to scroll the workspace to center on a given block
2018-04-06 11:42:10 -07:00
Rachel Fenichel
112f48592f
Return early if there's no block
2018-04-05 18:19:56 -07:00
Rachel Fenichel
5964278e7d
Handle RTL
2018-04-05 18:16:05 -07:00
Rachel Fenichel
2884bdfaa8
Use hideChaff instead of WidgetDiv.hide; move function closer to similar functions.
2018-04-05 17:42:37 -07:00
Neil Fraser
35f7357878
Strip coordinates from storage of single block stacks.
...
When loading, place blocks with no coordinates at 10,10 instead of 0,0.
2018-04-05 14:04:06 -07:00
Rachel Fenichel
8609d502c9
Add a function to scroll the workspace to center on a given block
2018-04-05 11:33:06 -07:00
Troy McKinnon
65d0b8fda7
Allow block xml disable tag to be more accepting
2018-04-04 13:42:01 -05:00
Sam El-Husseini
3926b3f7aa
Heal stack of any of the meta keys are pressed when dragging. Fixes Google/blockly#1485
2018-03-30 14:25:50 -07:00
jandrewb
237a7d5590
Fix #1745
2018-03-29 19:46:16 -05:00
Rachel Fenichel
a8ff2af394
Merge pull request #1737 from rachel-fenichel/feature/enable_pinch_to_zoom
...
Enable touch gestures and pinch-to-zoom
2018-03-28 10:24:12 -07:00
Rachel Fenichel
d85c0dab74
Fix #1484
2018-03-27 16:22:50 -07:00
Rachel Fenichel
d45170b118
Enable touch gestures and pinch-to-zoom
2018-03-27 16:08:03 -07:00
Neil Fraser
ec6b5c7f96
Dragging blocks towards the toolbox should create blocks rather than do nothing
...
Recreation of commit c2bf01ab48 which got
lost in a refactor.
2018-03-22 16:47:55 -07:00
Rachel Fenichel
2c7520a9db
Make bind/unbindEvent_ public
2018-03-22 12:14:58 -07:00
Rachel Fenichel
6d83b9bc28
Add keyword-spacing rule to eslint
2018-03-19 13:10:29 -07:00
Rachel Fenichel
3f77ceb823
Tighten line length rule from 120 to 100
2018-03-19 13:08:47 -07:00
Rachel Fenichel
701b187640
Fix #1699
2018-03-16 15:00:31 -07:00
Neil Fraser
6ff49fb3bf
Prevent fatal errors in browsers that don't support dataset.
2018-03-16 14:46:05 -07:00
Neil Fraser
554e644017
Don't compute (useless) location of trashcan while workspace is being built.
...
Theoretical performance bump, fixes crash in Opera 12.
2018-03-16 14:46:05 -07:00
Neil Fraser
b1e4648c3c
Use dataset instead of ID.
2018-03-16 14:46:05 -07:00
Neil Fraser
867dcdb716
Add IDs to bubbles.
2018-03-16 14:46:05 -07:00
Rachel Fenichel
81bc4674bc
Add hook for custom context menus on the workspace
2018-03-16 10:58:23 -07:00
Rachel Fenichel
70d782f24c
Merge pull request #1708 from rachel-fenichel/compiler_warnings
...
Warnings in drag surface classes
2018-03-15 14:45:16 -07:00
Rachel Fenichel
33d30f1907
Merge pull request #1707 from google/rachel-fenichel-patch-2
...
Get rid of variable redeclaration
2018-03-15 13:57:22 -07:00
Rachel Fenichel
f3107a49d0
Warnings in drag surface classes
2018-03-15 13:05:43 -07:00
Rachel Fenichel
8de5b3ee9f
Get rid of variable redeclaration
2018-03-15 13:04:09 -07:00