[Pkg-javascript-commits] [leaflet-markercluster] 440/479: Crude fix for issue#273 map loses focus when zooming in on cluster with keyboard
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:01:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit 975d3323b027ff1afdf3e07743fdcfd7ff85ed82
Author: Adam Bramley <adam at catalyst.net.nz>
Date: Wed Nov 20 12:20:37 2013 +1300
Crude fix for issue#273 map loses focus when zooming in on cluster with keyboard
---
dist/leaflet.markercluster-src.js | 5 +++++
dist/leaflet.markercluster.js | 2 +-
src/MarkerClusterGroup.js | 5 +++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dist/leaflet.markercluster-src.js b/dist/leaflet.markercluster-src.js
index 49c67ed..1fb7821 100644
--- a/dist/leaflet.markercluster-src.js
+++ b/dist/leaflet.markercluster-src.js
@@ -604,6 +604,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
} else if (this.options.zoomToBoundsOnClick) {
e.layer.zoomToBounds();
}
+
+ // Focus the map again for keyboard users.
+ if (typeof e.originalEvent.keyCode !== 'undefined' && e.originalEvent.keyCode === 13) {
+ document.getElementById(map._container).focus();
+ }
},
_showCoverage: function (e) {
diff --git a/dist/leaflet.markercluster.js b/dist/leaflet.markercluster.js
index ad73311..0227722 100644
--- a/dist/leaflet.markercluster.js
+++ b/dist/leaflet.markercluster.js
@@ -3,4 +3,4 @@
https://github.com/Leaflet/Leaflet.markercluster
(c) 2012-2013, Dave Leaver, smartrak
*/
-!function(t,e){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureG [...]
\ No newline at end of file
+!function(t,e){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureG [...]
\ No newline at end of file
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 5196ecb..8b71179 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -599,6 +599,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
} else if (this.options.zoomToBoundsOnClick) {
e.layer.zoomToBounds();
}
+
+ // Focus the map again for keyboard users.
+ if (typeof e.originalEvent.keyCode !== 'undefined' && e.originalEvent.keyCode === 13) {
+ document.getElementById(map._container).focus();
+ }
},
_showCoverage: function (e) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git
More information about the Pkg-javascript-commits
mailing list