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

Zoom feature disabled when switching between Tobii instances on the same page #121

Closed
mably opened this issue Dec 17, 2024 · 11 comments
Closed

Comments

@mably
Copy link
Contributor

mably commented Dec 17, 2024

Can be reproduced on the demo page:

image

Click on the first top left image and use the zoom feature by using the mouse wheel.

Then close the lightbox and click on the first image in the second row.

Once the lightbox is open, try to zoom using the mouse wheel, you'll see that it doesn't work.

The TRANSFORM.element variable doesn't seem to have been properly reset when switching lightbox instances.

@midzer
Copy link
Owner

midzer commented Dec 17, 2024

Hi @mably and thanks for filing :)

Right now, I can't reproduce this issue.

When tobii is closed or slides change, zoom should be reset via

if (isZoomed()) resetZoom()

@mably
Copy link
Contributor Author

mably commented Dec 17, 2024

I have been able to rather consistently reproduce the bug on Chrome, Safari and Firefox on MacOS Sonoma.

@mably
Copy link
Contributor Author

mably commented Dec 17, 2024

tobii-zoom-bug

@midzer
Copy link
Owner

midzer commented Dec 17, 2024

Okay, now I can reproduce:

  • Zoom in AND out (completely) on first picture
  • Then zoom is broken on the 2nd one

I'm on it for a fix.

@midzer
Copy link
Owner

midzer commented Dec 17, 2024

Fixed by 1ddba48

Thanks again for reporting @mably

@midzer midzer closed this as completed Dec 17, 2024
@mably
Copy link
Contributor Author

mably commented Dec 17, 2024

You're welcome @midzer, that was a quick fix! Thanks.

@mably
Copy link
Contributor Author

mably commented Dec 17, 2024

Don't know if it's related, but I'm getting those errors in my browser console now:

tobii.umd.js?somvmf:1406 Uncaught TypeError: Cannot read properties of null (reading 'style')
    at pan (tobii.umd.js?somvmf:1406:15)
    at resetZoom (tobii.umd.js?somvmf:1437:7)
    at cleanup (tobii.umd.js?somvmf:1042:7)
    at close (tobii.umd.js?somvmf:842:7)
    at HTMLDivElement.clickHandler (tobii.umd.js?somvmf:1145:9)

@midzer
Copy link
Owner

midzer commented Dec 17, 2024

Damn...hang on.

@midzer midzer reopened this Dec 17, 2024
@midzer
Copy link
Owner

midzer commented Dec 17, 2024

@mably Okay...another try 0d89c96

Can you test also before I release? :)

@mably
Copy link
Contributor Author

mably commented Dec 17, 2024

Yep sure.

@mably
Copy link
Contributor Author

mably commented Dec 17, 2024

Seems to work fine on my side 👍

@midzer midzer closed this as completed Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants