Commit Graph

80 Commits

Author SHA1 Message Date
Rachel Fenichel
0516310f66 Delete by id 2017-12-12 17:19:41 -08:00
Rachel Fenichel
08e065a75b Fix renaming 2017-12-12 17:19:41 -08:00
Rachel Fenichel
745bed5ac3 Can now create a variable with the button in the flyout; drag a block with a variable out of the flyout; handle default variable names; and import and export variables 2017-12-12 17:19:41 -08:00
Rachel Fenichel
731d2735c0 Add TODOs and fix return type 2017-12-12 17:19:41 -08:00
Rachel Fenichel
c825e60813 Allow variables of different types to share the same name. 2017-12-12 17:19:41 -08:00
picklesrus
e0f7862547 spacing changes 2017-11-02 14:05:29 -07:00
picklesrus
de8d13eaa1 Fix lint errors so we can eventually run eslint on travis. 2017-11-02 14:05:29 -07:00
Neil Fraser
e100c66659 Linting. 2017-10-24 14:06:29 -07:00
Neil Fraser
2445a752b7 Resolve another 20 warnings. 2017-10-24 14:06:29 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
marisaleung
d937920afc Remove out of date todo comments. 2017-06-20 13:15:28 -07:00
CoryDCode
1ee550aa24 Fixing the accessible variable stuff so it interacts correctly with (#1170)
variableMap.
2017-06-13 09:47:27 -07:00
marisaleung
833c2d0c40 Fire VAR events and test. 2017-06-09 14:42:14 -07:00
marisaleung
e9a480c51f Add VAR events. 2017-06-08 15:15:17 -07:00
marisaleung
a6f85cec53 Appease eslint: semicolons and such. 2017-05-25 13:44:06 -07:00
marisaleung
5fddba7545 Add VariableMap requirement to workspace. 2017-05-17 14:51:29 -07:00
marisaleung
12ea998155 Created separate file for VariableMap 2017-05-03 17:04:15 -07:00
marisaleung
d903b5e86b VariableMap and functions added. 2017-05-03 10:51:24 -07:00
marisaleung
b159c7c3b5 Create separate file for VariableMap and its functions. 2017-05-02 15:06:12 -07:00
marisaleung
2994805e6a VariableMap and functions added. 2017-05-02 10:07:46 -07:00
CoryDCode
537bf17b7d Adding the remove variable modal and functionality to accessible Blockly. (#1011) 2017-03-30 11:31:31 -07:00
Tim Dawborn
f9e0552c11 Add an allInputsConnected method to Block and Workspace to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off develop instead of master as per discussion in PR #791. 2016-12-28 12:26:53 +11:00
Neil Fraser
c27841f8df Fix compiler errors. 2016-11-15 16:41:11 -08:00
Neil Fraser
f6aef459fc API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
2016-11-15 13:54:33 -08:00
Andrew n marshall
52ffc64f6a Refactor variable rename to handle UI actions more directly. (#726)
FieldDropdown now has onItemSelected(..) method to handle the menu item selection action. Variable renames and deletes are now handled here, instead of during validation.

Also fixes an issue deleting variables used by less than two blocks.

Fixes #723.
2016-11-01 16:32:10 -07:00
rachel-fenichel
3d53b1e7fb Fix annotation 2016-10-21 17:34:59 -07:00
Andrew n marshall
81499e4392 Merge pull request #703 from AnmAtAnm/alert-confirm-prompt
Adding hooks to support custom alert, confirm, and prompt dialogs
2016-10-20 17:20:00 -07:00
Andrew n marshall
8f3b4bcb5e Replaces calls to window.alert(), window.confirm(), and window.prompt() with Blockly.alert(), Blockly.confirm(), and Blockly.prompt(). These are designed to allow app developers to replace the dialogs with versions that match their own open app, possibly avoiding modal browser dialogs. They each take a callback, so the developer has the opportunity to implement non-modal behavior. 2016-10-20 16:30:40 -07:00
Chris Johnson
832df810c1 Stops duplicating on rename of old ID to old ID. 2016-10-09 13:11:21 -05:00
Shannon McCabe
f7bbaaa82d JSDoc format fixes 2016-10-07 14:30:14 -07:00
Neil Fraser
bd4c6d096f Use goog.array.remove 2016-10-04 21:20:07 -07:00
picklesrus
dab7fd5751 Cherrypick fixes made directly to master back into develop (#619)
* Check result of window.confirm before deleting variables.

* Create CONTRIBUTING.md
2016-09-07 11:50:50 -07:00
Rachel Fenichel
d2ce081dc4 Move functions for updating variables on a workspace into workspace.js, and some lint 2016-08-17 16:07:50 -07:00
Rachel Fenichel
dfe61087f0 Correctly update variable list when pasting code 2016-07-14 15:39:41 -07:00
Rachel Fenichel
3f0b2961a1 call allUsedVariables in addTopBlock 2016-07-07 15:28:23 -07:00
Rachel Fenichel
13c6c63daa Create variables from the flyout 2016-07-07 14:39:45 -07:00
Rachel Fenichel
4a81ecb601 Create variable list, and use it for add and rename 2016-07-07 14:38:56 -07:00
Rachel Fenichel
77a8b92ac2 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-05-11 11:44:38 -07:00
Rachel Fenichel
3605dfb9c0 Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00
Rachel Fenichel
640b38f38e lint 2016-05-05 13:13:48 -07:00
Rachel Fenichel
a27fe99be4 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-04-25 14:25:36 -07:00
Neil Fraser
9f260501fe Remove duplicate getBlockById function. 2016-04-18 03:14:55 -07:00
rachel-fenichel
21e999678c correctly position trash can and zoom controls when the flyout is always open; add flyout and toolbox size to main workspace metrics; get rid of flyout's vertical offset. 2016-04-13 15:30:11 -07:00
rachel-fenichel
18a1550285 Horizontal toolbox layout with positioning at start or end. 2016-04-07 14:02:22 -07:00
Neil Fraser
61b3fbfe11 Move block database to workspace. 2016-04-05 18:43:39 -07:00
Neil Fraser
83925b2fe7 Merge branch 'master' into develop 2016-03-30 20:52:02 -07:00
Neil Fraser
a52c3e9db4 Roll back PR #300 due to issue #303. 2016-03-29 20:56:15 -07:00
rachel-fenichel
e2f1a6c843 Fix annotations 2016-03-29 14:26:56 -07:00
Neil Fraser
d73531da6b Routine recompile. 2016-03-29 09:04:25 -07:00
Ciaran Jessup
9d99fe5385 Clearing the workspace now works even if a field is being edited
Previously if a workspace.clear() was executed whilst a field was being edited then the following errors would appear in the console and the blockly workspace would become unresponsive.

    Uncaught TypeError: Cannot read property 'removeChangeListener' of null(anonymous function) @       blockly_compressed.js:19071Blockly.WidgetDiv.hide @ blockly_compressed.js:20609Blockly.WidgetDiv.hideIfOwner @     blockly_compressed.js:20620Blockly.FieldTextInput.dispose @ blockly_compressed.js:18961Blockly.Input.dispose @     blockly_compressed.js:15786Blockly.Block.dispose @ blockly_compressed.js:17275Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Block.dispose @ blockly_compressed.js:17272Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Block.dispose @ blockly_compressed.js:17272Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Block.dispose @ blockly_compressed.js:17272Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Workspace.clear @ blockly_compressed.js:14510window.onmessage @ index.html:175
    blockly_compressed.js:19041

    Uncaught TypeError: Cannot read property 'scale' of nullBlockly.FieldTextInput.resizeEditor_ @     blockly_compressed.js:19041Blockly.Workspace.fireChangeListener @ blockly_compressed.js:14544Blockly.Events.fireNow_ @     blockly_compressed.js:18833
 

Explicitly hiding the popup div first avoids this problem.
2016-03-29 12:10:48 +01:00