-
Notifications
You must be signed in to change notification settings - Fork 650
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
Autoscroll timeline when dragging an item when close to left/right borders #783
Comments
@davidbejarcaceres do u have solution for this? Thanks |
Thanks @davidbejarcaceres , item disappears if it is not in the range of visibleTimeStart and visibleTimeEnd |
@vagabondhoang I did manage to fix the item disappear/jump when the item goes off-screen, but I had to modify the library. To make sure the "time" is the correct you have to calculate it from the drag event (dragmove function in Item.js):
Now you can use this event
This way I solved the item disappear/jump because the "time" param received in function is not the exact position/time of the item been dragged while moving the timeline. You can do something similar for resize items and when close to the left/right border, move the timeline. |
@vagabondhoang You can check my solution for this issue in my new PR. Let's see if they accept it so anyone can use it. |
Bro @davidbejarcaceres , does it work for auto scroll vertically when drag item ups/downs? Thanks |
Is your feature request related to a problem? Please describe.
I´m trying to move/drag items from left to right, but it is limited by the visible time, between defaultTimeStart and defaultTimeEnd. But I´m trying to drag/move those items out of the boundaries when the moving/dragging item is closed to the left/right borders.
Describe the solution you'd like
Describe alternatives you've considered
I tried to implement it by myself using the moveResizeValidator() function, I replaced the content of this function in the demo-custom-items in the latest beta branch. By using the following code in the moveResizeValidator() function you can get the intended feature, but very often I get the items disappearing from the timeline, and after stop moving/dragging (onmouseup) it appears again in a different location of the mouse. You can replicate this using my solution with the following code:
` moveResizeValidator = (action, item, time, resizeEdge, newGroupIndex) => {
} `
Quick demo with the code above in the latest beta
Bug encountered very often since the library was not intender for this feature
The text was updated successfully, but these errors were encountered: