Evan W. Patton
e2b82e7627
Fix flyout errors due to invisible Backpack
2017-02-08 14:20:41 -05:00
Evan W. Patton
f6cedd4f83
Merge remote-tracking branch 'google/master' into feature/blockly-update
2017-02-03 08:55:43 -05:00
Rachel Fenichel
6b39c7d646
Merge pull request #782 from rachel-fenichel/feature/flyout_disable_resize
...
Disable workspace resizing while loading the flyout from XML
2016-12-15 11:15:39 -08:00
Rachel Fenichel
f54f229bc2
Disable workspace resizing while loading the flyout from XML
2016-12-14 17:06:09 -08:00
picklesrus
5b6f1debeb
Move the call to disable resize before placeNewBlock so that it is of… ( #777 )
...
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
2016-12-14 14:57:32 -08: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
Rachel Fenichel
ff87c76557
Don't make labels clickable
2016-12-02 14:03:49 -08:00
Rachel Fenichel
effc1d5f1c
Add ability to specify a css class for labels and buttons
2016-12-02 14:01:36 -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
Evan W. Patton
d2314b2a4e
[WIP] Prevent scrollbar generation in fixed-size flyouts
2016-11-10 13:36:25 -05:00
picklesrus
71f5f59642
Slightly simplify flyout setBackgroundPath method by passing the height and width calculated in similar ways. Before we were doing some calculations inside setBackgroundPath and some outside. ( #730 )
2016-11-03 12:06:03 -07:00
Rachel Fenichel
afca4264ca
Add option to style flyout buttons as labels
2016-10-31 15:20:16 -07:00
Rachel Fenichel
4d02e9bee6
lint
2016-10-31 14:38:55 -07:00
Rachel Fenichel
703bd96f7e
Allow creation of buttons with developer-designated callbacks
2016-10-31 14:24:00 -07:00
Rachel Fenichel
e2e2a3e298
Disable resizing the workspace during clearing and loading from xml, as an optimization
2016-10-21 14:30:30 -07:00
Neil Fraser
c2bf01ab48
Dragging blocks towards the toolbox should create blocks rather than do nothing.
2016-10-19 17:15:57 -07:00
Rachel Fenichel
acaf81185e
Mouseover behaviour fixes ( #684 )
...
* fix broken tooltips
* use bindEvent to make mouseover and mouseout work in the flyout
2016-10-11 10:55:42 -07:00
Shannon McCabe
f7bbaaa82d
JSDoc format fixes
2016-10-07 14:30:14 -07:00
Evan W. Patton
cbe48ff1df
Fix setting value on undefined due to ordering issue after merge
2016-10-02 13:22:39 -04:00
Evan W. Patton
081574babe
[WIP] Merge field.js and flyout.js
2016-09-28 20:51:17 -04:00
Evan W. Patton
16d1a6b362
[WIP] Rebase from Blockly SVN r1757 to git 641d720
2016-09-28 10:36:40 -04:00
Rachel Fenichel
ed983333eb
bindEventWithChecks_ for internal use, and bindEvent_ with old behaviour but deprecated
2016-09-23 13:46:11 -07:00
Rachel Fenichel
b771d8daf4
Cleanup
2016-09-07 18:14:05 -07:00
Rachel Fenichel
109e4bb352
Move code to touch.js
2016-09-07 17:42:09 -07:00
Rachel Fenichel
2774cc1663
Fix longpress in flyout; leave debug messages in
2016-09-01 13:08:59 -07:00
Rachel Fenichel
1c025672b3
Clear touch identifier at the ends of more drags. Includes flyout background, right-clicks on blocks, and loading sounds.
2016-08-31 15:56:37 -07:00
Rachel Fenichel
dc6ca79d4b
Merge branch 'develop' into feature/simple_multitouch
2016-08-25 12:25:48 -07:00
Rodrigo Queiro
5d7b2074a4
Add GAP_X/Y to the flyout
...
This makes it easy for users to customise the spacing in the flyout,
without having to repeat the same value of "sep" for every block.
2016-08-24 15:01:32 +02:00
Rachel Fenichel
3e4efe9424
Make blocks appear in the rtl horizontal flyout
2016-08-22 17:09:14 -07:00
Rachel Fenichel
d2ce081dc4
Move functions for updating variables on a workspace into workspace.js, and some lint
2016-08-17 16:07:50 -07:00
Rachel Fenichel
a2b3a3638a
Merge branch 'develop' into feature/variable_management
2016-08-12 14:32:26 -07:00
Rachel Fenichel
dc02dfb8ff
Separators specified in toolbox XML should replace, not add to, previous gaps.
2016-08-09 17:51:50 -07:00
Rachel Fenichel
3998ecec3a
Parse separators in xml in always-open flyouts
2016-08-09 16:34:59 -07:00
Rachel Fenichel
350e1ff2cc
Merge remote-tracking branch 'upstream/develop' into feature/variable_management_merge_develop
2016-08-08 16:58:51 -07:00
Rachel Fenichel
6b7965a727
Ignore everything but the first touch stream
2016-07-20 17:03:24 -07:00
Rodrigo Queiro
373b68d8b0
Add JSDoc for flyout drag state variables
2016-07-20 10:24:15 +02:00
Rachel Fenichel
f040929bd8
Merge remote-tracking branch 'upstream/develop' into feature/merge_develop
2016-07-15 13:07:07 -07:00
Rodrigo Queiro
74e905c611
Check flyout in isDragging()
...
We also have to record startFlyout_ on background scrolls - before
dragMode_ wasn't being reset by terminateDrag() for background scrolls,
which would suppress clicks from that point on.
Fixes #476 .
2016-07-15 10:35:45 +02:00
Rodrigo Queiro
d3d0ca4fd0
Record whether the workspace has been dragged ( #475 )
...
* Record whether the workspace has been dragged
This fixes #473 by differentiating between a touch on an unmovable block
and using it to drag the workspace.
* Remove isScrolling and add DRAG_BEGIN
Applied after PR review.
2016-07-12 11:34:02 -07:00
Neil Fraser
e849c93db9
Merge branch 'master' into develop
2016-07-08 16:52:18 -07:00
Rachel Fenichel
13c6c63daa
Create variables from the flyout
2016-07-07 14:39:45 -07:00
Rachel Fenichel
94e0a7ff4c
Change params of flyout.layout
2016-07-07 14:38:04 -07:00
Rachel Fenichel
cb3bef8f32
Flyout button with click handler
2016-07-07 14:37:12 -07:00
Rachel Fenichel
e371da3031
First pass at svg button in flyout
2016-07-07 14:35:30 -07:00
Rodrigo Queiro
589f6ae13f
Re-enable events even when an exception is thrown
...
This prevents a recoverable exception permanently disabling events. This
could be caused by calling domToWorkspace() to load a corrupt program.
2016-06-29 14:46:06 +02:00
Rodrigo Queiro
0454c93ff8
Clean up #417 after review
2016-06-29 12:26:11 +02:00
Rodrigo Queiro
4e3faf0158
Revise handling of mouse events on flyout blocks
...
- allows scrolling by dragging a block up and down
- dragging a block towards the workspace creates it
- dragging a block any direction in a non-scrollable flyout creates it
- dragging a shadow block works properly
- clicks on fields in non-closeable flyouts always open editors
- clicks in closeable flyouts create the block but don't open editors
Fixes #385 and fixes #405 .
2016-06-29 11:29:03 +02:00
Rodrigo Queiro
2dcb6cb68b
Ignore mouseup at end of drag with isDragging ( #416 )
...
This includes both block drags and workspace scrolls and fixes #404 . I
used isDragging rather than checking the origin of click so that it can
easily be extended to the case where the flyout is scrolled by dragging
a block, a la LLK/scratch-blocks#206 .
2016-06-28 18:11:48 -07:00
rachel-fenichel
aca074891d
Fix some problems with flyout rendering ( #461 )
2016-06-27 17:27:08 -07:00