Commit Graph

408 Commits

Author SHA1 Message Date
Katelyn Mann
b11bd4fb71 Remove Blockly.removeAllRanges and replace it with calls to add/remove
css to mark text as unselectable instead.  I can't prove this is
significantly faster with numbers since the call to setup the time out
costs ~.1ms and the call when the timer fires is ~.05.  This happens on almost
every mouse event though.  Plus, it seems to remove a flicker of highlighting when
frames are skipped and keeps scrolling via the scrollbar from highlighting.
2016-03-28 10:06:43 -07:00
Neil Fraser
39fbd24659 Remove setProcedureParameters from API (use domToMutation instead). 2016-03-22 10:48:13 -07:00
Neil Fraser
d086634394 Lint and recompile. 2016-03-18 15:19:26 -07:00
rachel-fenichel
cd3b563e54 Merge pull request #292 from rachel-fenichel/cleanup/constants
Move constants to their own file
2016-03-18 14:36:17 -07:00
rachel-fenichel
b37efe829e Move constants to their own file 2016-03-18 14:35:18 -07:00
Neil Fraser
a7892d1aee Raise error if statement block returns tuple. 2016-03-18 14:17:31 -07:00
Neil Fraser
6ae436a153 Add undo/redo context menu options on workspace. 2016-03-17 14:44:26 -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
Neil Fraser
2b96d7a756 Don't select blocks if readOnly is changed. 2016-03-16 19:10:36 -07:00
Neil Fraser
3bf04aedc6 Add toJson to events. 2016-03-16 17:55:44 -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
95fbc0bb49 Fix checkbox events. Fix block deletion while mutator is open. 2016-03-14 23:14:58 -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
8fb1178ed8 Update message descriptions. 2016-03-14 16:00:25 -07:00
rachel-fenichel
7b77527d57 Merge pull request #284 from rachel-fenichel/feature/last_in_stack
consider the last block on the stack when looking for places to attac…
2016-03-14 13:29:11 -07:00
rachel-fenichel
74ea1f1ffe consider the last block on the stack when looking for places to attach a dragging stack. 2016-03-11 18:07:26 -08:00
rachel-fenichel
4ae34599e0 Don't connect a block with no next connection if that would force a bump. 2016-03-11 17:38:59 -08:00
Neil Fraser
06ff90bcaf Merge pull request #274 from picklesrus/bbox-develop
Replace the call to getBBox() in getMainWorkspaceMetrics
2016-03-11 14:24:01 -08:00
Neil Fraser
580ff24a2a Merge pull request #280 from rachel-fenichel/bugfix/fix_requires
Require ConnectionDB where needed; recompile
2016-03-11 14:09:16 -08:00
rachel-fenichel
50975170d7 Fix search for closest 2016-03-11 13:13:34 -08:00
rachel-fenichel
f978826f77 Require ConnectionDB where needed; recompile 2016-03-11 12:16:25 -08:00
Neil Fraser
55784580e9 Group mutations into same event. 2016-03-06 18:32:20 -08:00
Neil Fraser
02d60a2dbe Group variable rename into same event. 2016-03-06 14:51:03 -08:00
Neil Fraser
65af8e58d4 Merge branch 'master' into develop 2016-03-03 17:49:09 -08: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
rachel-fenichel
abd1b5c5b8 Merge pull request #266 from rachel-fenichel/feature/connection_db_testing
Connection db testing
2016-03-03 11:40:26 -08:00
Neil Fraser
5097963cb1 Reduce code duplication in 'if' block. 2016-03-01 18:21:02 -08:00
picklesrus
a67f841671 Replace the call to getBBox() in getMainWorkspaceMetrics
with a manual calculation. getBBox() can cause the browser to
re-layout the whole page and we have much of the information
(e.g. individual block height and width) we need already cached.

Note that getBoundingRectangle's calculation is slightly different
than the one returned by getBBox.  It is off by 3 in the y direction
due to how one of the curves is drawn. This new calculation is
technically more accurate.
2016-02-29 16:29:15 -08:00
Rachel Fenichel
d29ffdc283 Lint 2016-02-29 15:50:12 -08:00
Neil Fraser
43d0b291b6 Merge pull request #272 from picklesrus/scroll-master
Add missing semicolons to methods. Oops.
2016-02-29 15:40:07 -08:00
picklesrus
2875a2e8a7 Add missing semicolons to methods. Oops. 2016-02-29 15:13:27 -08:00
Neil Fraser
fee94ae405 Allow injection based on CSS selector (based on PR 249). 2016-02-29 15:11:00 -08:00
Rachel Fenichel
7671986734 Move isConnectionAllowed to connection; clean up 2016-02-29 15:04:07 -08:00
Neil Fraser
3fe9ca6971 Merge branch 'master' into develop 2016-02-29 15:02:47 -08:00
Neil Fraser
6eb652cf70 Fix persistence of logging in playground. 2016-02-29 15:02:05 -08:00
Neil Fraser
1ae7b8e29e Merge pull request #270 from picklesrus/scroll-master
Rearrange code in ScrollbarPair set so that all the getAttribute
2016-02-29 14:47:48 -08:00
picklesrus
39653b697d Rearrange code in ScrollbarPair set so that all the getAttribute
calls come before all of the setAttribute calls.  This gets rid
of an unnecessary layout pass on mouseMove events.
2016-02-29 10:22:51 -08:00
Neil Fraser
4c542240e2 Provide default getVars and renameVar functions. Issue 265. 2016-02-27 12:28:32 -08:00
Rachel Fenichel
c177fa5276 add searchForClosest 2016-02-26 16:35:22 -08:00
Rachel Fenichel
1b1d777bc5 Add isConnectionAllowed and tests for it 2016-02-26 16:17:17 -08:00
Rachel Fenichel
0a363803f0 Clean up removeConnection; port in more tests. 2016-02-26 14:41:49 -08:00
Rachel Fenichel
e3b05ad2c1 Move connection_db to a new file and start adding tests 2016-02-26 14:13:18 -08:00
Neil Fraser
b567d6b0d7 Allow shadow blocks to be edited. 2016-02-26 00:22:31 -08:00
Neil Fraser
ea6d875c34 Merge pull request #263 from rachel-fenichel/feature/rendering_refactor
Extract rendering code from block_svg.
2016-02-25 18:03:14 -08:00
Rachel Fenichel
5cb6cf5a1d Fix js style 2016-02-25 15:30:05 -08:00
Rachel Fenichel
9263e28263 Add tests for connection logic 2016-02-25 15:16:32 -08:00
Rachel Fenichel
9de572283e Refactor: pull rendering code out of block_svg 2016-02-25 13:55:36 -08:00
Rachel Fenichel
67aa5ef5bc Minor refactor of connection code 2016-02-25 13:37:19 -08:00
Neil Fraser
4d4521bed3 Fix scaled RTL coordinates. 2016-02-25 11:08:59 -08:00
Neil Fraser
e6db687234 Fix startScale on workspaces without a fixed flyout. 2016-02-24 19:27:03 -08:00