Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flyout to have scroll mode/better behavior than drag angle #206

Closed
tmickel opened this issue Apr 12, 2016 · 2 comments
Closed

Update flyout to have scroll mode/better behavior than drag angle #206

tmickel opened this issue Apr 12, 2016 · 2 comments
Assignees
Milestone

Comments

@tmickel
Copy link
Contributor

tmickel commented Apr 12, 2016

Using the angle of the drag has some bugs. Can we use offset, or will that have its own bugs?

@carljbowman

@tmickel tmickel self-assigned this Apr 12, 2016
@tmickel tmickel added this to the Google I/O milestone Apr 12, 2016
@tmickel
Copy link
Contributor Author

tmickel commented Apr 13, 2016

@drigz @rachel-fenichel
I think we should actually be thinking of this in terms of "drag mode" - i.e.,
Once a certain magic number of touch events have happened, and either the angle or vertical offset is still below some threshold, switch to "scroll mode." In scroll mode, all touch events are passed toward scroll and a new block is never created until a new touch is made.

That way, once you start scrolling, your finger can even leave the pane altogether and keep scrolling. This is the most natural touch behavior. I think once we switch to this mode-based system, whether we use angle or vertical offset should be mostly irrelevant.

Rodrigo, if you have the time and want to give a shot at implementing that, that would be great. Otherwise, I'll have to get to it sometime in the next few weeks :)

@rachel-fenichel
Copy link
Collaborator

@tmickel yeah, I like that a lot better.

@tmickel tmickel changed the title Consider using vertical offset (in horizontal toolbox) for determining if new blocks are created Update flyout to have scroll mode/better behavior than drag angle Apr 14, 2016
@tmickel tmickel removed their assignment Apr 19, 2016
@tmickel tmickel modified the milestones: May 19, Google I/O Apr 20, 2016
@tmickel tmickel self-assigned this Apr 20, 2016
tmickel added a commit that referenced this issue Apr 23, 2016
* Add flyout dragMode_ and function to determine intention

* A click on the block rect is also checked for mode
@tmickel tmickel closed this as completed Apr 23, 2016
drigz added a commit to drigz/blockly that referenced this issue Jun 9, 2016
This includes both block drags and workspace scrolls and fixes google#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 scratchfoundation/scratch-blocks#206.
NeilFraser pushed a commit to google/blockly that referenced this issue Jun 29, 2016
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 scratchfoundation/scratch-blocks#206.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants