Disable map scrollWheelZoom

Disable the scrollWheelZoom feature on all embedded leaflet maps. It
prevents accidental zoom into a map during webpage scrolling.

Change-Id: I6660e11c08ff9acd112398df74316f028dd77cd1
This commit is contained in:
Marton Kiss 2013-11-18 20:53:56 +01:00
parent 6e46674c6b
commit 5ec3043041

View File

@ -7,4 +7,17 @@ function groups_common_form_alter(&$form, &$form_state, $form_id) {
$form['custom_search_types']['#type'] = 'hidden';
$form['custom_search_types']['#default_value'] = 'o-search_facetapi';
}
}
/**
* Implements hook_leaflet_map_info_alter().
* Disable scrollWheelZoom feature for all leaflet maps.
*
* @param unknown $map_info
*/
function groups_common_leaflet_map_info_alter(&$map_info) {
foreach ($map_info as $map_id => $info) {
$map_info[$map_id]['settings']['scrollWheelZoom'] = FALSE;
}
}