Commit graph

104 commits

Author SHA1 Message Date
Tim Mickel
c9515597e1 Move dragSurface.createDom up to inject.js 2016-04-07 23:00:33 -04:00
Tim Mickel
bc75b84aa8 Resize drag surface using only CSS 2016-04-02 16:24:47 -04:00
Tim Mickel
e8c0346378 Fix positioning of drag surface using relative container 2016-04-01 17:32:01 -04:00
Tim Mickel
5c0522638e Public dragSurface for BlockSvg 2016-04-01 17:05:43 -04:00
Tim Mickel
30d1c247cd Add drag surface sizing and translation 2016-04-01 16:40:59 -04:00
Tim Mickel
cbc38698d2 Add injection of the dragSurface 2016-04-01 16:32:56 -04:00
Tim Mickel
3cbe49e37a Merge branch 'develop' of https://github.com/google/blockly into google-master-april-1
# Conflicts:
#	blockly_compressed_horizontal.js
#	core/block.js
#	core/block_render_svg_vertical.js
#	core/connection.js
#	core/inject.js
2016-04-01 15:00:44 -04:00
Tim Mickel
a65109f423 Merge remote-tracking branch 'Google/master' into google-master-april-1
# Conflicts:
#	blockly_compressed_horizontal.js
#	blockly_uncompressed_vertical.js
#	blocks_compressed.js
#	core/block.js
#	core/block_svg.js
#	core/blockly.js
#	core/connection.js
#	core/field_textinput.js
#	core/workspace_svg.js
#	generators/lua/lists.js
#	generators/lua/text.js
#	msg/js/he.js
#	msg/js/id.js
#	msg/js/sr.js
#	msg/js/zh-hant.js
#	msg/json/en.json
2016-04-01 14:44:46 -04:00
Tim Mickel
6a341a2193 Semicolon and note about startDragMetrics 2016-03-30 14:14:02 -04:00
rachel-fenichel
e2f1a6c843 Fix annotations 2016-03-29 14:26:56 -07:00
Tim Mickel
8bf0f97f63 Move scroll method to WorkspaceSvg 2016-03-29 14:23:34 -04:00
Tim Mickel
18960bcbf6 Refactor to remove duplicate scroll bounds logic 2016-03-29 13:12:20 -04:00
Tim Mickel
473cb0abce Scrol workspace on mouse wheel and pinch-zoom
Distinguish pinch-zoom in Chrome using e.ctrlKey.

If a mouse wheel event is not a zoom event, scroll the workspace.

2016-03-29 13:12:20 -04: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
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
65a25ffb7e Don't offer to cleanup blocks in non-scrolling workspace. 2016-03-24 21:31:13 -07:00
Neil Fraser
d086634394 Lint and recompile. 2016-03-18 15:19:26 -07:00
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
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
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
Tim Mickel
b6ed46a9f7 Throw an exception for non-existing blocks in glowBlock 2016-03-11 13:27:20 -05: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
Tim Mickel
c48c2234fb Add glowBlock method to WorkspaceSvg 2016-03-04 10:27:57 -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
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
Tim Mickel
fd9f6a6d00 Remove Blockly sound playing and replace with a callback 2016-02-24 15:50:36 -05:00
Ray Schamp
1a6dff7f42 Merge branch 'master' of github.com:google/blockly into merge/google-2016
# Conflicts:
#	blockly_compressed_vertical.js
#	blockly_uncompressed_vertical.js
#	blocks/text.js
#	blocks_compressed.js
#	core/block_svg.js
#	core/connection.js
#	core/field_textinput.js
#	core/flyout.js
#	core/toolbox.js
#	tests/playground.html
2016-02-18 13:29:25 -05:00
Rachel Fenichel
c0e28dcb15 switch to an enum 2016-02-17 16:32:31 -08:00
Neil Fraser
6e6a04b879 Add X/Y coordinates and block ID to create event. 2016-02-16 21:57:22 -08:00
Rachel Fenichel
3462a5a2c1 position toolbox 2016-02-12 10:57:33 -08:00
Neil Fraser
0fab13400a Fire function events instead of DOM events. 2016-02-11 21:40:33 -08:00
Rachel Fenichel
803d0e72b2 Turn toolbox sideways in the horizontal playground. 2016-02-11 14:46:51 -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