Closed akopan closed 7 years ago
This is a very helpful option to support. If this project is not really active any more, hopefully this code can help others with scroll wheel issues in this plugin.
@akopan this project is active. Just not having time to make updates anymore. To disable scrollWheelZoom is as simple as adding this:
$leafLet = new LeafLet([
'name' => 'propertyMap',
'tileLayer' => $tileLayer,
'center' => $center,
'zoom' => 10,
'clientOptions' => [
'maxZoom' => 18
]
]);
// ... more code here
$leafLet->appendJs('propertyMap.scrollWheelZoom.disable();'); // disable zoom
The Leaflet JS library supports disabling scrollWheelZoom with the following code:
I haven't found how your yii2 extension supports this. I circumvented this issue by using the following code in my Yii2 app when creating my Map widget:
And adding the support in the Map widget (widgets\Map.php) :
Am I missing something? Or should I submit a pull request?