- (function(){
- // leaflet.js raises bug when trying to addClass / removeClass multiple classes at once
- // Let's create a wrapper on it which fixes it.
- var LDomUtilApplyClassesMethod = function(method, element, classNames) {
- classNames = classNames.split(' ');
- classNames.forEach(function(className) {
- L.DomUtil[method].call(this, element, className);
- });
- };
-
- L.DomUtil.addClasses = function(el, names) { LDomUtilApplyClassesMethod('addClass', el, names); };
- L.DomUtil.removeClasses = function(el, names) { LDomUtilApplyClassesMethod('removeClass', el, names); };
- })();
-