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

feat: start to scroll when an event is dragged out of the visible area #909

Closed

Conversation

RobertMischke
Copy link

What changed: On the the day view, when events are dragged outside of the view, the view port starts scrolling. It is not perfect...

The following problems exist:

  • the scrolling stops, after a certain amount of jumps, probably because the dragMove() event does not fire anymore
  • it is possible to drag the event out of view.

@codecov-io
Copy link

codecov-io commented Mar 3, 2019

Codecov Report

Merging #909 into 0.27 will decrease coverage by 0.08%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##             0.27    #909      +/-   ##
=========================================
- Coverage   98.19%   98.1%   -0.09%     
=========================================
  Files          38      39       +1     
  Lines         829     843      +14     
  Branches       64      64              
=========================================
+ Hits          814     827      +13     
- Misses          0       1       +1     
  Partials       15      15
Impacted Files Coverage Δ
...dar/src/modules/day/calendar-day-view.component.ts 99.13% <100%> (+0.02%) ⬆️
...lendar/src/modules/day/calendar-day-auto-scroll.ts 90.9% <90.9%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6fb3de...07e4fe0. Read the comment docs.

Copy link
Owner

@mattlewis92 mattlewis92 left a comment

Choose a reason for hiding this comment

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

Hey, thanks for opening this PR! I think it's better to solve it in the drag and drop lib directly though so then it will work on all 3 views, plus anyone else that uses that library.

Thankfully, there is already a package which does most of the heavy lifting, integrating it should be a case of calling autoScroll when the drag starts and then destroying the scroll listener when the drag ends.

Would you like to take a go at a PR to add it over at the angular-draggable-droppable repo?

@mattlewis92
Copy link
Owner

Thanks for your contribution, I just released 0.27.5 which now supports scrolling the container when dragging events 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants