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

plugin:Gallery-plugin wheel event on laptop(like mac), swipe event seem weird #1090

Closed
venmax opened this issue Sep 26, 2023 · 7 comments
Closed
Labels
Milestone

Comments

@venmax
Copy link

venmax commented Sep 26, 2023

Describe the bug

If TouchPad on laptop will be supported, only add deltaY * 50 to scrollLeft seems not enough, WheelEvent will be triggered too many times

// packages/gallery-plugin/src/GalleryComponent.ts
    handleEvent(e: Event) {
        switch (e.type) {
            case 'wheel':
                this.container.scrollLeft += (e as WheelEvent).deltaY * 50
...

Online demo URL

https://codesandbox.io/s/brave-matsumoto-7j77cd

Photo Sphere Viewer version

5.4.2

Plugins loaded

gallery-plugin

OS & browser

Mac, chrome

Additional context

No response

@venmax venmax added the bug label Sep 26, 2023
@mistic100
Copy link
Owner

So what must be done ?

@mistic100
Copy link
Owner

do you have a video of what happens ?

@venmax
Copy link
Author

venmax commented Sep 26, 2023

do you have a video of what happens ?

I fork a demo here (bad usage of same panorama but gallery works):
https://codesandbox.io/s/brave-matsumoto-7j77cd

on TouchPad swipe(mainly left and right), the scrollbar go forward and back, sometimes(swipe fast) back to the first item.

If just "up&down" swipe supported, disable "left&right" swipe may be better?

@mistic100
Copy link
Owner

Please provide a video, I do not have a Mac and with a standard pad there is no problem.

disclaimer : this will probably end with "wontfix" and "help needed" because I just cannot debug Apple specifics

@venmax
Copy link
Author

venmax commented Sep 26, 2023

Please provide a video, I do not have a Mac and with a standard pad there is no problem.

disclaimer : this will probably end with "wontfix" and "help needed" because I just cannot debug Apple specifics

Ok, that's fine.

I uploaded a video, in the 4th seconds, I actually do is a 'swipe right' action
https://github.com/mistic100/Photo-Sphere-Viewer/assets/4507022/6a20c838-a09a-4916-96d7-3941405cf07e

@mistic100 mistic100 added help wanted Issues that require help from other developpers wontfix and removed help wanted Issues that require help from other developpers wontfix labels Sep 26, 2023
@mistic100
Copy link
Owner

I don't think there is a specific peoblem with your track pad, upon testing even when using a standard mouse wheel the scroll distance is way higher than expected.

@mistic100 mistic100 added this to the 5.4.3 milestone Sep 26, 2023
@github-actions
Copy link

github-actions bot commented Oct 1, 2023

This feature/bug fix has been released in version 5.4.3.

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

No branches or pull requests

2 participants