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

View File

@@ -109,7 +109,7 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
* {DOMElement} The button element, or undefined.
*/
getPressedButton: function(element) {
var depth = 5, // limit the search depth
var depth = 3, // limit the search depth
button;
do {
if(OpenLayers.Element.hasClass(element, "olButton")) {