Demo/move resize items moves timeline when item close to left right border #875
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Solution for issue #783.
Use the
moveResizeValidator()
function to move/resize an item close to the left/right border of the timeline, and auto scroll the timeline bounds to the direction of the move/resize item. By doing this you can keep moving/resizing the item without to stop, move timeline and move/resize again and item.Overview of PR
Move item left/right
Here you can see the functionality to auto scroll timeline when move item close to left/right borders:
React-Calendar-Timeline.Move.mp4
Resize edges of item left/right
Now for resize item close to left/right borders:
React-Calendar-Timeline.Resize.mp4
Check tests passed
Yes, no errors when running
yarn run test
, no many changes to library itself, just extra params to themoveResizeValidator
function in Iitem.js.