Commit graph

338 commits

Author SHA1 Message Date
Neil Fraser
ac0b5e7871 Use ENUM for dragMode. Blocks no longer sticky when created from disappearing flyout. 2016-03-29 08:36:11 -07:00
Neil Fraser
5f1cb3b92c Add click UI event. 2016-03-29 08:10:44 -07:00
Neil Fraser
741491347b Add list of ids to create/delete events for robustness. 2016-03-28 18:10:54 -07:00
Neil Fraser
db7a787778 Add UI events. 2016-03-28 15:40:37 -07:00
Neil Fraser
92f224dd52 Merge pull request from picklesrus/develop-perf-1
Remove Blockly.removeAllRanges and replace it with calls to add/remove
2016-03-28 12:17:11 -07:00
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
b8d48ebabe Destroy attached shadow block when input is destroyed. 2016-03-26 19:37:12 -07:00
rachel-fenichel
8401d91071 Fix bugs with first in stack, again 2016-03-22 17:12:00 -04:00
rachel-fenichel
1d5d89f9df Always disconnect the ghost. 2016-03-21 16:57:39 -04:00
rachel-fenichel
9758d50576 Merge branch 'develop' into feature/complicated_ghosts 2016-03-18 17:01:39 -07:00
Neil Fraser
d086634394 Lint and recompile. 2016-03-18 15:19:26 -07:00
rachel-fenichel
88a3d15518 Merge pull request from rachel-fenichel/feature/no_ghost_events
Don't fire events for ghost blocks.
2016-03-18 13:51:59 -07:00
Neil Fraser
a3b850b0d3 Merge pull request 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
rachel-fenichel
60677297cf reuse ghost block instead of recreating 2016-03-16 14:45:17 -07:00
rachel-fenichel
eb45586c48 lint 2016-03-16 12:05:36 -07:00
rachel-fenichel
19bc2244b8 Correctly handle ghosts at the beginning of a stack 2016-03-16 12:01:43 -07:00
Rachel Fenichel
1d2f712456 WIP on ghosts for pants blocks 2016-03-16 11:12:30 -07:00
Rachel Fenichel
2103dd4ce2 Ghosts for pants block; conforms to blockly-style insertion rules. 2016-03-16 11:12:30 -07:00
Rachel Fenichel
2d2aca5d48 complicated ghosts 2016-03-16 11:12:30 -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
rachel-fenichel
dd57be8ed3 Don't fire events for ghost blocks. 2016-03-15 15:35:19 -07:00
Tim Mickel
5241c4dd9f Merge remote-tracking branch 'Google/develop' into upstream-march-15
# Conflicts:
#	blockly_compressed_vertical.js
#	blockly_uncompressed_vertical.js
#	blocks/text.js
#	core/block_svg.js
2016-03-15 10:35:47 -04:00
Tim Mickel
210fd0d339 Merge pull request from tmickel/feature/running-glows
Glows on running blocks and (partially) stacks
2016-03-15 10:18:15 -04:00
Neil Fraser
95fbc0bb49 Fix checkbox events. Fix block deletion while mutator is open. 2016-03-14 23:14:58 -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
Neil Fraser
06ff90bcaf Merge pull request from picklesrus/bbox-develop
Replace the call to getBBox() in getMainWorkspaceMetrics
2016-03-11 14:24:01 -08:00
Tim Mickel
516cd05d82 Merge remote-tracking branch 'Google/develop' into feature/upstream-merge-march-11-2
# Conflicts:
#	blockly_compressed_vertical.js
#	blocks_compressed.js
#	build.py
#	core/connection.js
#	core/workspace.js
#	tests/playground.html
2016-03-11 13:18:14 -05:00
Neil Fraser
55784580e9 Group mutations into same event. 2016-03-06 18:32:20 -08:00
Rachel Fenichel
5af8a2c8c4 snap to start of preexisting stack. 2016-03-04 14:52:37 -08:00
Tim Mickel
348564cd76 Add glow property to block_svg and set colour 2016-03-04 10:21:10 -05: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
Tim Mickel
5bdc3070b9 Merge branch 'upstream' into feature/upstream-merge
# Conflicts:
#	blockly_compressed_vertical.js
#	blockly_uncompressed_vertical.js
#	core/connection.js
#	tests/jsunit/index.html
#	tests/playground.html
2016-03-03 11:55:59 -05:00
Rachel Fenichel
76871c54e3 remove unused var 2016-03-02 11:25:09 -08:00
Neil Fraser
5097963cb1 Reduce code duplication in 'if' block. 2016-03-01 18:21:02 -08:00
Rachel Fenichel
6e30464108 ghost blocks on insertion on a previous connection 2016-03-01 16:48:48 -08:00
Rachel Fenichel
391e449c9c Merge branch 'develop' into feature/ghost_blocks 2016-03-01 15:18:49 -08:00
Tim Mickel
f361e7a5a2 Merge pull request from tmickel/feature/remove-graphic-effects
Remove graphic effects
2016-02-29 20:30:18 -05: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
Tim Mickel
1d4a730e07 Remove disconnection wiggle 2016-02-29 16:15:03 -05:00
Tim Mickel
f9efeca34f Merge branch 'develop' into feature/block-on-tap 2016-02-26 13:29:18 -05:00
Rachel Fenichel
9de572283e Refactor: pull rendering code out of block_svg 2016-02-25 13:55:36 -08:00
Tim Mickel
393c0b2aee Add block tap listeners 2016-02-24 13:57:14 -05:00
Rachel Fenichel
6ee0744b5c Refactor block_svg to share code between horizontal and vertical versionss. 2016-02-24 10:19:59 -08:00
Rachel Fenichel
6a9e82217b ghost blocks 2016-02-23 14:46:04 -08:00
Ray Schamp
9d82e79e9c Update inputs to match spec 2016-02-23 16:59:53 -05:00
Ray Schamp
7de680b718 Fix value input positioning on nested statements
Thank you @tmickel
2016-02-23 16:58:21 -05:00
Ray Schamp
75c877848d WIP: Position inputs 2016-02-23 16:58:21 -05:00
Ray Schamp
4e08ad8002 Fix empty pants width 2016-02-23 16:54:53 -05:00
Rachel Fenichel
5464f52910 remove zombie code 2016-02-19 10:42:10 -08:00