Set onFocusOnly: true when initializing maps, so that the user must click on the map before scroll zoom works.
This commit is contained in:
parent
cc5664473c
commit
c8c89d195e
|
@ -2,10 +2,12 @@
|
|||
Drupal.behaviors.farm_map = {
|
||||
attach: function (context, settings) {
|
||||
var units = Drupal.settings.farm_map.units;
|
||||
var interactions = { onFocusOnly: true };
|
||||
if (settings.farm_map.maps) {
|
||||
settings.farm_map.maps.forEach(function (target) {
|
||||
$('#' + target, context).once('farm-map', function () {
|
||||
farmOS.map.create(target, { units: units });
|
||||
$('#' + target, context).attr('tabIndex', 0);
|
||||
farmOS.map.create(target, { units: units, interactions: interactions });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue