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

zoomDelta and zoomSnap options #1274

Closed
haldo98 opened this issue Mar 26, 2024 · 3 comments
Closed

zoomDelta and zoomSnap options #1274

haldo98 opened this issue Mar 26, 2024 · 3 comments
Labels

Comments

@haldo98
Copy link

haldo98 commented Mar 26, 2024

Describe your problem

I'd love to implement the zoomDelta and zoomSnap options in the configureLeaflet.

In leaflet these are declared at init, with L.map

I need help. How can I have those two options?

Thank You.

Online demo URL

No response

Photo Sphere Viewer version

5.7.2

Plugins loaded

plan

Additional context

No response

@haldo98
Copy link
Author

haldo98 commented Apr 1, 2024

Update:
I found that const map = planPlugin.getLeaflet();   map.options.zoomDelta=(0.25);

works with the buttons +/- I added on the map.
But not with the keyboard +/- With keyboard the zoomDelta remains = 1

I noticed that PgUp/PgDown zooms In or zooms out the pano even if the map is maximized.

https://www.tadini.it/temp/panorama_plan.html

Hope it helps.

@mistic100
Copy link
Owner

Unfortunatley Leaflet has no public API to update these options on the fly. I cannot make it configurable.

You can still change them in configureLeaflet as you did, you just have to additionally call this to make the keyboard behave correctly.

map.keyboard._setZoomDelta(map.options.zoomDelta);

@mistic100
Copy link
Owner

I noticed that PgUp/PgDown zooms In or zooms out the pano even if the map is maximized.

Because Leaflet does not listen to PgUp/PgDown, only +/-

@mistic100 mistic100 closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
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