Lightbox/modal multi image improvements - #381 #2249

Closed
wyatt777 wants to merge 5 commits from gitlab-mr-iid-982 into develop
Member

changes for issue #381

changes for issue #381
Member

I designed the gesture service to handle multiple directions by registering multiple gesture trackers, so you don't actually need to hack the GestureService.swipeGesture to take more args and we can keep it simpler. You can do things like

this.leftSwipeGesture = GestureService.swipeGesture(GestureService.DIRECTION_LEFT, this.goNext, 50, 1.0)
this.rightSwipeGesture = GestureService.swipeGesture(GestureService.DIRECTION_RIGHT, this.goPrev, 50, 1.0)
I designed the gesture service to handle multiple directions by registering multiple gesture trackers, so you don't actually need to hack the `GestureService.swipeGesture` to take more args and we can keep it simpler. You can do things like ``` this.leftSwipeGesture = GestureService.swipeGesture(GestureService.DIRECTION_LEFT, this.goNext, 50, 1.0) this.rightSwipeGesture = GestureService.swipeGesture(GestureService.DIRECTION_RIGHT, this.goPrev, 50, 1.0) ```
Author
Member

Cool. How do I use that on one object?

@touchstart.stop="mediaTouchStart" @touchmove.stop="mediaTouchMove"

Cool. How do I use that on one object? ` @touchstart.stop="mediaTouchStart" @touchmove.stop="mediaTouchMove"`
Author
Member

There is one <img> object that takes this.

There is not a left image object, and right image object.
There is just one that needs to pick up both directions of the swipe.

I hope this makes sense.

There is one `<img>` object that takes this. There is not a left image object, and right image object. There is just one that needs to pick up both directions of the swipe. I hope this makes sense.
Member

in mediaTouchStart you can call beginSwipe for both gestures, and in mediaTouchMove you can call updateSwipe for both gestures as well. this way can track multiple gestures with just touch event

in mediaTouchStart you can call beginSwipe for both gestures, and in mediaTouchMove you can call updateSwipe for both gestures as well. this way can track multiple gestures with just touch event
Author
Member

makes sense :) Will try it and revert changes if it works!

makes sense :) Will try it and revert changes if it works!
Author
Member

Gesture service reverted!

Gesture service reverted!
Member

This is integrated into MFC fork and seems to be working on bikeshed.party. If there are no objections to merging it, I would like to merge it this weekend.

This is integrated into MFC fork and seems to be working on bikeshed.party. If there are no objections to merging it, I would like to merge it this weekend.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma-fe!2249
No description provided.