Commit Graph

203 Commits

Author SHA1 Message Date
Rachel Fenichel
46da00dbd3 Merge pull request #1787 from rachel-fenichel/feature/block_animations
Move block animation code to a new file and rebuild
2018-04-18 10:17:43 -07:00
Neil Fraser
662d79443f Add 'ordered' option to descendant getting functions. (#1786) 2018-04-17 11:41:03 -07:00
Rachel Fenichel
4e3b114832 Move block animation code to a new file and rebuild 2018-04-16 15:28:52 -07:00
Neil Fraser
1d385f8d69 Require goog.userAgent in the correct files. 2018-04-11 16:59:35 -07:00
Neil Fraser
6ff49fb3bf Prevent fatal errors in browsers that don't support dataset. 2018-03-16 14:46:05 -07:00
Neil Fraser
b1e4648c3c Use dataset instead of ID. 2018-03-16 14:46:05 -07:00
Neil Fraser
867dcdb716 Add IDs to bubbles. 2018-03-16 14:46:05 -07:00
Neil Fraser
c7b29d0bc0 Expose block ID in SVG. (#1698) 2018-03-12 14:04:03 -07:00
Rachel Fenichel
4c9b602523 Move event classes into separate files, and update requires accordingly 2018-02-27 17:47:33 -08:00
Rachel Fenichel
3e62ffc20a Split at higher level for multiline function calls 2018-01-24 11:26:41 -08:00
Rachel Fenichel
9a53e96d53 More lint fixes 2018-01-23 18:22:53 -08:00
Rachel Fenichel
3b81eede3e Call forceRerender instead of setText 2017-11-17 14:39:12 -08:00
Neil Fraser
5707657569 Stop blocks from exploding.
Uncompiled a goog.math.Coordinate toStrings as a nice “(1, 2)”, but
complied it toStrings as a useless “[object Object]”.  Fixes #1448.
2017-11-14 15:44:09 -08:00
Neil Fraser
8cedef49ac Cleanup. 2017-11-07 14:23:41 -08:00
Rachel Fenichel
768bd4aef5 Check workspace.isDragging() instead of Blockly.dragMode_ 2017-11-03 15:46:41 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
Rachel Fenichel
5a8ebef4b8 Move some context menu options into contextmenu.js (#1372) 2017-10-23 13:27:39 -07:00
Rachel Fenichel
236aadec3e Don't share the warning text PID map between blocks (#1371)
* Don't share the warning text PID map between blocks

* Clear pending warnings on dispose
2017-10-20 10:35:14 -07:00
Neil Fraser
ddd4700e1d Strip licences from compiled code. (#1318) 2017-09-14 17:23:50 -07:00
Rachel Fenichel
4b9fc09fed Code cleanup in BlockSvg.prototype.tab (#1277) 2017-08-14 15:34:44 -07:00
Neil Fraser
fc8d4c90b4 Compatibility for Closure Compiler. (#1240) 2017-07-31 09:07:41 -07:00
marisaleung
170b16706f Modularize Rename Variable prompt and allow custom context menus for flyout. 2017-07-06 15:41:18 -07:00
Rachel Fenichel
de67108b17 Fix #1160 (#1197)
Fix "Connection UI Effect not playing on block connect"
2017-06-29 15:13:56 -07:00
marisaleung
aff9c4867c Correctly named block events called. 2017-06-08 15:44:43 -07:00
Rachel Fenichel
c0b906f4b6 Create grid object (#1131)
* Create grid object

* Doc

* Units!  Thanks @RoboErikG
2017-05-24 16:14:24 -07:00
Rachel Fenichel
71066faff6 Move blockSvg.getHeightWidth to block_render_svg.js (#1118) 2017-05-24 13:38:46 -07:00
Rachel Fenichel
620a210106 Move audio code to a new file (#1122)
* move audio code to a new file

* dispose

* null check
2017-05-22 16:58:31 -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
marisaleung
2588ff8353 Merge pull request #1049 from marisaleung/develop
bumpNeighbours_ function moved to block_svg.
2017-04-19 10:25:18 -07:00
marisaleung
21bf339e5d bumpNeighbours_ function moved to block_svg.
Fixed #1009
2017-04-17 15:22:53 -07:00
marisaleung
e4edc3899a Ensure useDragSurface is a boolean.
Fixed #988
2017-04-11 15:33:51 -07:00
Rachel Fenichel
f2f522d77a Miscellaneous comment cleanup 2017-04-05 15:52:49 -07:00
Rachel Fenichel
92f3880008 RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead. 2017-03-27 17:25:41 -07:00
Rachel Fenichel
3d08099950 Merge pull request #809 from google/paternity
Option for moving one block from stack.
2017-02-22 10:39:11 -08:00
Jim Mussared
ec878b02cd Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
2017-02-06 08:41:17 -08:00
Neil Fraser
c68684dda6 Expand stack-drag modifier key to include alt and ctrl. 2017-01-09 22:55:17 -08:00
Neil Fraser
c489ca1fc9 Option for moving one block from stack.
See thread in support group before merging.
2017-01-07 23:56:09 -08:00
Rachel Fenichel
a0e6d4bbb5 Don't connect to blocks under the flyout. 2017-01-05 16:06:15 -08:00
Neil Fraser
97644fdf04 Improve comments. 2016-12-03 06:34:18 -08:00
Neil Fraser
a66d274169 Fix broken highlighting when highlighted block is deleted. Issue 752. 2016-11-21 01:18:28 -08:00
Neil Fraser
4cda20dbbf Fix speling. 2016-11-19 02:40:11 -08:00
Neil Fraser
8fba5cd044 Fix selection border on blocks that have been highlighted. 2016-11-15 17:49:51 -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
picklesrus
7f02c19bfe Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging.  This is a backport of the block drag surface from scratch-blocks.  At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move.  At the end of the drag, the blocks are dropped back in the svg in their new position.
2016-11-15 13:19:49 -08:00
Rachel Fenichel
b5822e2925 Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a000.
2016-11-11 17:05:13 -08:00
Neil Fraser
c8ca24a000 Revert "Rebuild nov 3 16" 2016-11-08 16:46:00 -08:00
Rachel Fenichel
80e9a5663c Fix bug with longpress and touch on ios 2016-11-08 16:18:05 -08:00
Rachel Fenichel
0c015fd439 Merge pull request #710 from rachel-fenichel/feature/save_load_optimization
Disable resizing the workspace during clearing and loading from xml, …
2016-10-28 15:01:05 -07:00
Neil Fraser
144be4d49f Block highlighting
* Separate block selection (editing) from highlighting (execution).
* Remove add/removeDragging functions. They clutter the API for no reason.
2016-10-26 18:39:56 -07:00