change buttonclick.getPressedButton depth value from 5 to 3, this allows buttons with grand children (2 levels)

This commit is contained in:
Éric Lemoine
2012-02-29 13:34:47 +01:00
parent 00909404ab
commit 6a43fcaefc
+1 -1
View File
@@ -109,7 +109,7 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
* {DOMElement} The button element, or undefined. * {DOMElement} The button element, or undefined.
*/ */
getPressedButton: function(element) { getPressedButton: function(element) {
var depth = 5, // limit the search depth var depth = 3, // limit the search depth
button; button;
do { do {
if(OpenLayers.Element.hasClass(element, "olButton")) { if(OpenLayers.Element.hasClass(element, "olButton")) {