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

Add touch swipe navigation to Calendar Day / Week / Month / Year views #2344

Open
1 task
pmiklashevych opened this issue Feb 5, 2021 · 1 comment
Open
1 task

Comments

@pmiklashevych
Copy link

pmiklashevych commented Feb 5, 2021

Requested here: https://www.bryntum.com/forum/viewtopic.php?p=82433#p82433

  • Swipe gesture in header row of day view and week view

CalendarDrag feature should use longpress to initiate drag. On swipe event call Calendar.shiftNext() / Calendar.shiftPrevious().

@isglass isglass added this to the 4.2.0 milestone Feb 5, 2021
@matsbryntse matsbryntse changed the title Add slide navigation to Calendar views Add touch swipe navigation to Calendar Day / Week / Month / Year views Feb 5, 2021
@ExtAnimal
Copy link

As a foundational matter, we need a gesture recognition layer so that we can simply detect "swipe", "pinch", "zoom", "rotate" etc.

Then it would be as simple as

EventHelper.on({ 
    element : this.element,
    swipe   : 'up.onElementSwipe',
    thisObj : this
});

And onElementSwipe would just call previous or next depending on the direction property of the passed generated event.

In terms of the visual effect, @dongryphon is creating an animation utility. We can produce a visual swipe effect similar to how Google Calendar does it. It basically fades the view out, then runs 2 animations at once: fade in, and also slide in but just the last ~200 pixels of the slide to give the impression of it appearing from the expected side.

@matsbryntse matsbryntse removed this from the 4.2.0 milestone Jun 22, 2021
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

4 participants