Fix L.DomUtil.removeClasss method. Regex wasn't matching '-' chars in class names.

This commit is contained in:
Neno 2011-07-31 14:04:04 +01:00
parent 6b23b4325b
commit 6d509e432b

View File

@ -86,7 +86,7 @@ L.DomUtil = {
},
removeClass: function(el, name) {
el.className = el.className.replace(/(\w+)\s*/g, function(w, match) {
el.className = el.className.replace(/(\S+)\s*/g, function(w, match) {
if (match == name) return '';
return w;
}).replace(/^\s+/, '');