Hello, Is there a way to prevent the map from zooming in and out on desktop when scrolling on the page the widget’s on?
This script should do the trick:
document.addEventListener(
'wheel',
(e) => {
if (e.target.closest('[class*="maplibregl-canvas-container"]')) {
e.stopImmediatePropagation();
}
},
true
);
Please add it to the Custom JS field on the Settings tab of your widget’s settings and let me know how it worked ![]()
This worked perfectly, thank you! Is there a way to lower the widget’s height as well?
Sure, here isthe code that should be to the Custom CSS field on the Style tab of your widget’s settings:
.global-styles,
[class*="widget__Container-sc"] {
height: 600px !important;
}
I’m having trouble getting this to work. Any additional advice would be greatly appreciated!
