Commit Graph

81 Commits

Author SHA1 Message Date
marisaleung
aff9c4867c Correctly named block events called. 2017-06-08 15:44:43 -07:00
Rachel Fenichel
98914fcf6b Dragging changes, rebased on develop (#1078)
* Add block drag surface translateSurfaceBy

* Add dragged connection manager

* Add gesture.js

* Add GestureHandler

* Implemented gesture skeleton

* Most basic workspace dragging

* Add dragged connection manager

* cleanup

* doc

* more cleanup

* Add gesture handler

* Add translateSurfaceInternal

* core/block_dragger.js

* cleanup

* Pull in changes to dragged connection manager

* Pull in changes to dragged connection manager

* comments

* more annotations

* Add workspace dragger

* Add coordinate annotations

* Start on block dragging

* Limit number of concurrent gestures

* Add some TODOs

* start using dragged connection manager

* Set origin correctly for dragging blocks

* Connect or delete at the end of a block drag.

* cleanup

* handle field clicks and block + workspace right-clicks

* move code into BlockDragger class, but still reach into Gesture internals a lot

* Clean up block dragger

* Call blockDragger constructor with correct arguments

* Enable block dragging in a mutator workspace

* Add workspace dragger

* click todos

* Drag flyout with background

* more dragging from flyout

* nit

* fix dragging from flyouts

* Remove unused code and rename gestureHandler to gestureDB

* Rename gesture handler

* Added some jsdoc in gesture.js

* Update some docs

* Move some code to block_svg and clean up code

* Lots of coordinate annotations

* Fix block dragging when zoomed.

* Remove built files from branch

* More dragging work (#1026)

-- Drag bubbles while dragging blocks
-- Use bindEventWithChecks to work in touch on Android. Not tested anywhere else yet.
-- Handle dragging blocks while zoomed
-- Handle dragging blocks in mutators
-- Handle right-clicks (I hope)
-- Removed lots of unused code

* More dragging work (#1048)

- Removed gestureDB
- Removing uses of terminateDrag
- Cleaned up disposal code

* Dragging bugfixes (#1058)

- Get rid of flyout.dragMode_ and blockly.dragMode_
- Make drags from the flyout start from the top block in the group
- Block tooltips from being scheduled or shown during gestures
- Don't resize mutator bubbles mid-drag

* Fix events in new dragging (#1060)

* rebuild for testing

* unbuild

* Fix events

* rebuild

* Fix up cursors

* Use language files from develop

* Remove handled TODOS

* attempt to fix IE rerendering bug, and recalculate workspace positions on scroll

* Rebuild all the things

* Comment cleanup; annotations; delete unused variables.
2017-05-05 12:42:53 -07:00
Andrew n marshall
79becd6b31 Add no-op stub .neighbors() for headless Connection. 2017-02-13 16:28:43 -08:00
Andrew n marshall
24ebbcaad0 Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911) 2017-02-06 14:15:20 -08:00
Sean Lip
bf3b5f9d0d Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus. 2017-01-27 18:33:39 -08:00
Rachel Fenichel
2474ec53ab Stop bumping neighbours in headless blockly 2017-01-27 11:33:04 -08:00
rachel-fenichel
7a1db20765 Allow terminal blocks to replace other terminal blocks (#433)
* Allow terminal blocks to replace other terminal blocks

* Updated test to allow replacing terminal blocks
2016-06-17 14:34:28 -07:00
Rodrigo Queiro
c09624a1b8 Remove reference to undefined variable (#413)
REASON_MUST_DISCONNECT was removed by a refactor in 2a1ffa1.
2016-06-08 10:01:04 -07:00
Neil Fraser
9ca00656ad Properly deal with shadow statement blocks in stacks. 2016-06-05 16:58:27 -07:00
Neil Fraser
cf8ee673a9 Fix inheritance on rendered connection.
Closure compiler on maximum compression breaks badly due to lack of
@extends attribute.
2016-06-03 18:44:40 -07:00
Neil Fraser
a625d5b07c Fix unit tests. 2016-06-03 16:40:50 -07:00
Neil Fraser
1db8092f15 Do not allow shadow blocks to have non-shadow children. 2016-05-29 14:53:29 -07:00
Rachel Fenichel
954b061e4a Merge branch 'develop' into feature/dragged_connection_list 2016-05-12 13:20:16 -07:00
Rachel Fenichel
e28db7bc4e JS Doc and private 2016-05-10 15:46:51 -07:00
Rachel Fenichel
45f9b8af05 consolidation 2016-05-10 15:45:19 -07:00
rachel-fenichel
7b1fdcb7c6 make tests work; make connext_ a member function. 2016-05-10 15:45:19 -07:00
rachel-fenichel
fbaa33b888 split connection into rendered_connection and connection 2016-05-10 15:43:32 -07:00
Rachel Fenichel
640b38f38e lint 2016-05-05 13:13:48 -07:00
Neil Fraser
c785cabe40 Use more coordinates. 2016-04-19 23:24:42 -07:00
Neil Fraser
c3931df2ae Fix shadow block init on headless workspaces. 2016-04-07 16:24:27 -07:00
rachel-fenichel
5c8ff88587 Keep a list of connections that are being dragged 2016-04-05 16:13:19 -07:00
Neil Fraser
4e42a1b78e Swap order of arguments on domToWorkspace. 2016-04-04 18:31:41 -07:00
Neil Fraser
2ce0a25f92 Fix error thrown when disconnecting blocks that have never been dragged. 2016-04-02 04:53:04 -07:00
rachel-fenichel
ae1a0aab8a add isConnected() to connections. 2016-03-30 15:10:59 -07:00
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
e7fcc39e78 Remove redundant movable check from checkType. 2016-03-27 01:46:53 -07:00
Neil Fraser
e0ebce1b60 Fix undoing function argument changes. 2016-03-24 15:30:29 -07:00
Neil Fraser
d086634394 Lint and recompile. 2016-03-18 15:19: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
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
8fb1178ed8 Update message descriptions. 2016-03-14 16:00:25 -07: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
rachel-fenichel
50975170d7 Fix search for closest 2016-03-11 13:13:34 -08:00
Neil Fraser
02d60a2dbe Group variable rename into same event. 2016-03-06 14:51:03 -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
d29ffdc283 Lint 2016-02-29 15:50:12 -08:00
Rachel Fenichel
7671986734 Move isConnectionAllowed to connection; clean up 2016-02-29 15:04:07 -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
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
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
67aa5ef5bc Minor refactor of connection code 2016-02-25 13:37:19 -08:00
Neil Fraser
0fab13400a Fire function events instead of DOM events. 2016-02-11 21:40:33 -08:00
Neil Fraser
a481c1cff8 Customizable angle pickers. 2016-02-09 22:36:15 -08:00
Neil Fraser
bbfd883629 Reduce duplication in Connection.connect. Support shadow statement blocks. Fix race condition. 2016-01-30 13:08:47 -05:00
Neil Fraser
a114849545 Remove duplicated connection path from connection.js 2016-01-28 22:12:42 -05:00
Neil Fraser
211595075e Make colour optional in JSON. Add ;/n in generator stub. 2016-01-28 14:25:38 -05:00
Neil Fraser
9804b31bb0 Allow easier addition of custom loops or functions. 2016-01-21 18:16:25 -08:00