Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be nice if we could configure other options on the formatter such as the scrollWheelZoom. I will work on a patch.
Comment | File | Size | Author |
---|---|---|---|
#19 | leaflet-scrollWheelZoom-2002976-19.patch | 3.88 KB | yannickoo |
Comments
Comment #1
briand44 CreditAttribution: briand44 commentedHere is the patch. It just adds a checkbox to disable the scrollWheelZoom.
Comment #2
richardbporter CreditAttribution: richardbporter commentedTested and worked great but re-rolled to reverse the logic of the setting.
Comment #3
richardbporter CreditAttribution: richardbporter commentedRemoved a dpm() statement.
Comment #4
briand44 CreditAttribution: briand44 commentedPatch in #3 worked for me.
Comment #5
briand44 CreditAttribution: briand44 commentedI created a new patch which adds the ability to disable the scrollWheelZoom in views as well.
Comment #6
danon1981 CreditAttribution: danon1981 commentedTrying the patch in #5 failed
patching file leaflet_views/leaflet_views_plugin_style.inc
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 154.
Hunk #3 FAILED at 365.
Has someone else applied the patch in #5 successfully?
Comment #7
2phathe patch at: https://drupal.org/node/2089209 gives the ability to set all map options, including scrollWhelZoom.
Comment #8
gcbMarking duplicate: if we are going to add this option we'll add the rest of the config options as in #2089209. Thanks for the patch though!
Comment #9
briand44 CreditAttribution: briand44 commentedI am opening this issue back up because of https://drupal.org/comment/8182295#comment-8182295. I have re-created the patch to apply against the latest dev version.
Comment #10
bneil CreditAttribution: bneil commentedThe functionality in #9 works as advertised. I did run into the issue identified in #2185767: Leaflet field formatter errors when trying to edit geocoded field in view or panel which is a separate issue and had to comment out #empty_options so I could test the patch.
I've modified only the #description to standardize it with the language used in the Leaflet API regarding the scroll wheel.
Comment #11
fullerja CreditAttribution: fullerja commentedPatch in #10 works for me. I also had to comment out #empty_options to test leaflet_views
Comment #12
yannickooHere is a new version of this patch, applies to latest dev :)
Comment #13
RdeBoerThanks yannickoo.
Rik
Comment #14
RdeBoerPatch from #12 applied (but not tested yet).
Available now in Leaflet 7.x-1.x-dev and in the next official release, when ready.
Rik
Comment #16
RdeBoerConsider this fixed until proven otherwise. Please someone test, as I don't have the time right now.
Rik
Comment #17
yannickooSorry for re-opening but I found 2 issues in the current implementation:
scroolWheelZoom
should be enabled by default because this is the default Leaflet behavior for a mapif
condition is wrong so when you don't want to havescroolWheelZoom
it is not exposed to the JavaScript settingsI have uploaded a new patch :)
Comment #18
gifad CreditAttribution: gifad commentedare you sure ?
don't you mean
scrollWheelZoom
?Comment #19
yannickooSorry :D
Comment #20
ac#19 works
Comment #21
RdeBoer@ac, @yannickoo
Re #19: Thanks -- will apply soon.
Rik
Comment #23
RdeBoerConsidering this fixed now.
Reopen if not.
Available now in 7.x-1.x-dev or 7.x-1.2 when released.
Rik