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.
#51
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 #297 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 #113 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 #274 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 #198 .
2016-02-04 13:25:30 -08:00
Neil Fraser
e5e7c7aa81
Merge pull request #198 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 #232 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 #214 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