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

Regions plugin - Scroll when near edges of container #1318

Merged
merged 4 commits into from
Feb 14, 2018

Conversation

roboswank
Copy link
Contributor

@roboswank roboswank commented Feb 4, 2018

When dragging, if mouse or region edge is near the container's edges, scroll in that direction.

Short description of changes:

Added checks, within region mouse move events, to scroll the container when within a certain threshold of the container's edges.

New region plugin options available:
scroll - defaults to true
scrollSpeed - defaults to 1
scrollThreshold - defaults to 10

Related Issues and other PRs:

fixes #430

When mouse or region edge is near the container's edges, scroll in that direction.
@@ -639,12 +780,25 @@ export default class RegionsPlugin {
region = this.add(params || {});
}

Copy link
Contributor Author

@roboswank roboswank Feb 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if duration needs to be called on each interaction - but moved it to eventDown so it is not being called on every mouse move.

@thijstriemstra
Copy link
Contributor

@roboswank can you add a changelog item for this?

@thijstriemstra thijstriemstra changed the title Fix #430: Regions - Scroll when near edges of container Regions plugin - Scroll when near edges of container Feb 14, 2018
@thijstriemstra thijstriemstra merged commit e8dd12e into katspaugh:master Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dragging a region doesn't work outside of scrollbar
2 participants