Commit Graph

52 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
picklesrus
52f76013b5 Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors.  The old way was quite slow because it changed the stylesheet directly.  See issue #981 for more details on implementation and tradeoffs.  This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
2017-04-21 14:57:54 -07:00
picklesrus
a82bd49d7e Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG.  This paves the way to make performance
improvements to workspace dragging.
2016-12-09 16:19:19 -08:00
Neil Fraser
4cda20dbbf Fix speling. 2016-11-19 02:40: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
Katelyn Mann
33e9d75457 Fix for #521.
Add a isMutator member similar to isFlyout to workspace_svg so it knows whether
it is mutator or not. Allow blocks to access that property so that they can recalculate
coordinates appropriately.
2016-08-16 11:19:29 -07:00
picklesrus
d215314ffd Revert "Convert createDom calls to createUntypedDom" 2016-07-20 15:21:45 -07:00
Neil Fraser
877aa7522d Fix mutator/warning/comment icons to highlight on mouse over only if they are usable. 2016-07-19 16:34:48 -07:00
Rodrigo Queiro
d9a3569706 Convert createDom calls to createUntypedDom (#481)
Unless they could be converted to use goog.dom.TagName, in which case do
that. createDom is going to require goog.dom.TagName member as the
tagName parameter. This change prepares for that.
2016-07-18 07:18:17 -07:00
Rachel Fenichel
4841f136f1 More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
Rachel Fenichel
cb4e9cd737 Fix mutator workspace in ltr 2016-05-13 15:06:06 -07:00
Neil Fraser
7e96a60da7 Use goog.math.Coordinate instead of separate X and Y properties. 2016-04-19 21:14:49 -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
db7a787778 Add UI events. 2016-03-28 15:40:37 -07:00
Neil Fraser
82fdb5805b Fix leaky group. Recompile. 2016-03-24 16:54: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
6ae436a153 Add undo/redo context menu options on workspace. 2016-03-17 14:44:26 -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
55784580e9 Group mutations into same event. 2016-03-06 18:32:20 -08:00
Neil Fraser
0fab13400a Fire function events instead of DOM events. 2016-02-11 21:40:33 -08:00
Neil Fraser
d310b96f84 Add mutation events. 2016-02-10 21:40:51 -08:00
Neil Fraser
c429949a4e Add Create, Delete, and Change events.
Not counting change for mutators.
2016-01-20 19:11:03 -08:00
Neil Fraser
4253de041a Remove old realtime. 2016-01-08 13:03:22 -08:00
Neil Fraser
3bce368115 Simplify workspace options by removing svg property. 2016-01-07 17:01:01 -08:00
Neil Fraser
26828d6c08 Simplify gear icon. 2015-12-16 18:22:42 -08:00
Neil Fraser
19263bdd5b Vectorize icons. 2015-12-13 11:06:15 +01:00
Neil Fraser
6acaf35967 Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
Neil Fraser
dff95fc7b0 Allow for mutators with no quarks. 2015-12-04 23:35:39 -08:00
Neil Fraser
edd3e3bf33 Lint corrections. 2015-06-17 13:05:24 -07:00
Neil Fraser
f454f77910 Break out procedure call argument rendering into separate function. 2015-04-30 14:57:14 -07:00
Neil Fraser
9924498485 Enable trashcans in mutators. 2015-04-29 00:13:05 -07:00
Neil Fraser
17961f7f58 Support multiple Blockly instances. 2015-04-28 13:51:25 -07:00
Neil Fraser
f899b5bed7 Lint cleanup. 2015-04-03 16:07:25 -07:00
Neil Fraser
0d376386f2 Replace 8-tooth gear with 6-tooth gear for mutator icon. 2015-03-26 14:21:14 -07:00
Neil Fraser
e2af14c32f Replace drawn icons with images (issue 45). 2015-03-25 23:58:58 -07:00
Neil Fraser
612b190ef4 Add background grid for snapping. 2015-03-08 12:48:42 -07:00
Neil Fraser
bdc4795fb6 Simplify workspace construction. 2015-03-06 15:27:41 -06:00
Neil Fraser
169ece400b Bump unconnected blocks after mutator change. 2015-02-27 14:24:20 -08:00
Neil Fraser
d05177e17c Fix error when creating uneditable blocks with mutators. 2015-02-06 17:06:16 -08:00
Neil Fraser
c9addf7e31 Improve accuracy of goog.require calls. 2015-02-06 15:27:25 -08:00
Neil Fraser
48bffac316 Partially fix mutators (issue 38). 2015-01-01 14:30:37 -08:00
Neil Fraser
0f8d01209c Headless workspaces and blocks. 2014-12-23 11:22:02 -08:00
Neil Fraser
674625c47e Add red 'X' to mouse cursor if blocks are over flyout. 2014-11-28 21:43:39 -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
6ee38cdec3 Automatic commit Tue Jan 28 03:00:09 PST 2014 2014-01-28 03:00:09 -08:00