Commit Graph

42 Commits

Author SHA1 Message Date
Andrew n marshall
680fc4b6d3 Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
2017-02-06 13:40:05 -08:00
Andrew n marshall
4fdd16b499 JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
2017-01-13 16:54:27 -08:00
Andrew n marshall
ac3df2759c PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.

Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens.  Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.

Replaces the direct JavaScript references (not pure JSON, and thus not portable).

Demonstrating this behavior in the logic_boolean dropdown.
2017-01-11 15:47:56 -08:00
Andrew n marshall
dd95203cdc controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749) 2016-11-16 09:55:58 -08:00
Neil Fraser
c27841f8df Fix compiler errors. 2016-11-15 16:41:11 -08:00
Andrew n marshall
e5d25bb686 String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
 * Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
2016-11-15 15:51:51 -08:00
Rachel Fenichel
82261e3d68 Remove ifelse block and messages' 2016-11-11 17:21:29 -08:00
Andrew n marshall
72ff6d9ead Adding controls_ifelse block (#722)
Adding controls_ifelse, an if/else block that is loaded from JSON and does not use mutators. This gives "else" capability to Android & iOS implementations, which don't support JavaScript mutators.

Added this block to the playground simple toolbox and all generators.
2016-10-31 11:00:39 -07:00
Neil Fraser
b614cfb1c1 Fix RTL comparator operators. 2016-08-24 02:49:53 -07:00
Rachel Fenichel
8597c94a49 lint 2016-05-24 15:35:38 -07:00
Neil Fraser
c1872750ae Fix recursive undo/redo loop in logic_compare and logic_ternary blocks. 2016-03-27 02:20:30 -07:00
Neil Fraser
a3b850b0d3 Merge pull request #287 from rachel-fenichel/feature/source_block_fn
Add a getter; stop accessing private field sourceBlock_ from outside …
2016-03-16 19:45:20 -07:00
rachel-fenichel
2c70f7ec26 Add a getter; stop accessing private field sourceBlock_ from outside of a connection. 2016-03-15 16:03:49 -07:00
Neil Fraser
72bb08a4ec Add undo/redo.
Some bugs in undoing function argument changes.
2016-03-14 23:14:05 -07:00
Neil Fraser
2a1ffa11c4 Add undo/redo. Also refactor connections.
Bugs in undoing mutators and renaming variables.
2016-03-03 17:48:54 -08:00
Neil Fraser
5097963cb1 Reduce code duplication in 'if' block. 2016-03-01 18:21:02 -08:00
Madeeha
7d48f253e6 changing the controls_if_if block to allow controls_if_elseif and controls_if_else blocks to attach to the bottom of the if block instead of in the middle of the block. 2015-12-17 15:29:50 -08:00
Neil Fraser
6acaf35967 Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
Neil Fraser
535b4202d9 Convert 5 blocks to JSON.
No functional change.
2015-08-24 01:28:43 -07:00
Neil Fraser
64bd9d498d Stop calling onchange on deleted blocks. 2015-07-13 14:16:09 -07:00
Neil Fraser
e300931071 Allow multiple interpolation messages. Fix variable context menus. 2015-06-27 12:49:01 -07:00
Neil Fraser
41b2a61931 Fix NaN in if block (issue #109). 2015-06-17 14:59:03 -07:00
Neil Fraser
edd3e3bf33 Lint corrections. 2015-06-17 13:05:24 -07:00
Neil Fraser
9050e32954 Adding JsonInit method of creating blocks. 2015-06-08 15:54:18 -07:00
Neil Fraser
17961f7f58 Support multiple Blockly instances. 2015-04-28 13:51:25 -07:00
Neil Fraser
706080c7ae Prevent 'c?a:b' block from performing type violations. 2015-03-22 01:53:17 -07:00
Neil Fraser
deb133cc25 Improve previous commit (faster, remove dependency). 2015-02-02 17:00:19 -08:00
Paul Kendall
82f1ab1157 Fix the logic block to bump the correct block.
Previously it was always bumping the first block added
even if you are putting the new block over the first block, so it
bumped the new block as well.
2015-02-03 11:06:57 +13:00
Neil Fraser
69294d8344 Change logic compare block to eject mismatched blocks. 2015-01-28 17:45:13 -08:00
Neil Fraser
193c47420c Refactor previous merge. 2015-01-28 17:07:22 -08:00
Paul Kendall
1bf394ad83 Update logic block so it is reactive to the input attahced to it.
i.e. if you place a number in an input the other input changes it's type to number as well.
When you remove all inputs it reverts back to allowing any input type.
2015-01-29 13:26:18 +13:00
Neil Fraser
ddcf1ac969 Factor out hues into constants. 2015-01-26 01:20:03 -08:00
Neil Fraser
9a605e90e7 Reduce duplicated code in text and list blocks. 2014-12-19 18:14:41 -08:00
Neil Fraser
6539211104 Change official project URL. 2014-10-07 13:09:55 -07:00
Neil Fraser
7122410373 Changing project location from Google Code to GitHub. 2014-09-08 15:18:02 -07:00
Neil Fraser
d998a1c8ec Update to latest version. 2014-09-08 14:26:52 -07:00
ellen.spertus
c3b19ca9cc Automatic commit Wed Feb 5 03:00:02 PST 2014 2014-02-05 03:00:02 -08:00
ellen.spertus
6ee38cdec3 Automatic commit Tue Jan 28 03:00:09 PST 2014 2014-01-28 03:00:09 -08:00
ellen.spertus
c7a1b36c86 Automatic commit Wed Jan 22 03:00:07 PST 2014 2014-01-22 03:00:07 -08:00
ellen.spertus
5dd5a49d36 Automatic commit Sat Jan 4 03:00:02 PST 2014 2014-01-04 03:00:02 -08:00
ellen.spertus
ea211c5080 Manual commit 2013-12-20 16:25:26 -08:00
ellen.spertus
a8acffd81c New initial commit with .svn directories and their contents ignored. 2013-10-30 14:46:03 -07:00