Commit graph

75 commits

Author SHA1 Message Date
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
8fb1178ed8 Update message descriptions. 2016-03-14 16:00:25 -07: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
rachel-fenichel
f978826f77 Require ConnectionDB where needed; recompile 2016-03-11 12:16:25 -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
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
Neil Fraser
4d4521bed3 Fix scaled RTL coordinates. 2016-02-25 11:08:59 -08:00
Neil Fraser
f0d04ba16b Fix RTL flyout events. 2016-02-24 16:52:55 -08:00
Neil Fraser
6e6a04b879 Add X/Y coordinates and block ID to create event. 2016-02-16 21:57:22 -08:00
Neil Fraser
0fab13400a Fire function events instead of DOM events. 2016-02-11 21:40:33 -08:00
Neil Fraser
3bbd46d6d7 Merge branch 'master' into 2016 2016-02-05 18:42:22 -08:00
Neil Fraser
5ca8b36cfc Allow <sep> to be used to add gaps between blocks. 2016-02-05 18:41:47 -08:00
Neil Fraser
0b467cf6b3 Minor style nits from PR . 2016-02-04 13:25:30 -08:00
Neil Fraser
e5e7c7aa81 Merge pull request from carloslfu/zoom_to_fit_clean_pr
Add zoomToFit method to Workspaces
2016-02-04 13:13:42 -08:00
Neil Fraser
a4d330a75a Merge pull request from rexpie/master
Fix for issue https://github.com/google/blockly/issues/210
2016-02-04 13:11:50 -08:00
picklesrus
80d8d55315 Cache delete area rectangle bounds in the on mouse down event
to avoid getting it for every mouse move event. The delete areas
won't change while the user is dragging blocks around.
Also switch calculations for delete area inclusion to be done in
client coordinates so we don't have to convert to svg coordinates on
every mouse move event.
This should speed up dragging blocks a bunch.
2016-02-03 15:36:39 -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
4b0ed0d372 Add custom event file. 2016-01-12 16:47:18 -08:00
Neil Fraser
80f36f0629 Clean up for demo apps. 2016-01-08 13:58:18 -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
Rex Xia
a16f6f6207 Fix for issue https://github.com/google/blockly/issues/210 2016-01-05 13:54:52 +08:00
Neil Fraser
a5ea93a1db Allow comments in flyouts. 2015-12-17 14:16:04 -08:00
Neil Fraser
3b3ef79fbd Create block id database. 2015-12-09 10:02:42 +01:00
Neil Fraser
6acaf35967 Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
Neil Fraser
fa279b91ce Add option to delete all blocks on workspace. 2015-12-02 22:10:09 -08:00
Allison Lamm
137905df69 fixing JSDoc format 2015-12-02 11:09:50 -06:00
Neil Fraser
cd36f2ca12 Merge pull request from trodi/type-data
adding additional type annotations
2015-12-01 12:29:08 -08:00
Neil Fraser
383ca8258c Fix toolbar with both colours and subcategories.
Also fix updating of toolbar after loading Blockly.
2015-12-01 12:28:19 -08:00
Troy McKinnon
482c62dfa2 adding additional type annotations 2015-12-01 14:04:54 -06:00
Neil Fraser
11ef9f2988 Add hook for clicking on trashcan. 2015-10-25 23:50:20 -07:00
Neil Fraser
ec99c95718 Speed up unhiding of workspace with large numbers of blocks. 2015-10-24 23:53:07 -04:00
Neil Fraser
1026d353ce Allow blocks in toolbox to be disabled individually. 2015-10-21 15:21:51 -07:00
Neil Fraser
a485e63df2 Allow zooming of non-scrolling workspaces. 2015-10-21 14:38:39 -07:00
Carlos Galarza
a9d4ba4c8d Add zoomToFit method to Workspaces 2015-10-15 17:51:52 -05:00
Neil Fraser
4dffad0dad Improve 'clean up' spacing. 2015-10-12 16:14:03 -07:00
Neil Fraser
879cacbb8d Add 'clean up blocks' command to workspace menu. 2015-10-09 19:22:22 -07:00
Neil Fraser
701ae603b7 Fix headless connections. 2015-10-09 13:53:14 -07:00
Ken Cheung
18bac530d8 Refactor duplicated callback function for collapse and expand options 2015-10-05 21:26:16 +08:00
Neil Fraser
fbab06082e Recompile language updates. 2015-09-28 14:17:53 -07:00
Neil Fraser
8ecfab014f Separate overlapping emboss filter and disabled pattern across multiple Blockly instances. Issue 184. 2015-09-28 12:20:28 -07:00
Neil Fraser
33a0cc98de Switch focus to correct workspace when clicking on block. 2015-09-23 14:46:29 -07:00
Neil Fraser
47ad32f6c7 A better fix for the zoom center button. 2015-09-22 17:51:21 -07:00
Neil Fraser
890d8d8d73 Fix zoom center button. Reverse disconnect wiggle. 2015-09-22 17:28:51 -07:00
Neil Fraser
7ecf7df1cb Don't leave blockly_uncompressed.js empty for a long period during build. 2015-09-21 16:12:21 -07:00
Neil Fraser
3f8e586fe8 Use prototypes for primitive properties. 2015-09-12 19:31:22 -07:00
Neil Fraser
e4c902a105 Fix RTL alignment of new blocks when zoomed. 2015-09-02 00:09:49 +01:00
Neil Fraser
f9d47bd39e Lay out trashcan and zoom controls more flexibly. 2015-09-01 22:44:33 +01:00
Neil Fraser
7568015c8c Scale the flyout as the workspace zooms. 2015-09-01 20:00:13 +01:00