worldmap/leaflet/easy-button.js
function State(template, easyButton){

  this.title = template.title;
  this.stateName = template.stateName ? template.stateName : 'unnamed-state';

  // build the wrapper
  this.icon = L.DomUtil.create('span', '');

  L.DomUtil.addClass(this.icon, 'button-state state-' + this.stateName.replace(/(^\s*|\s*$)/g,''));
  this.icon.innerHTML = buildIcon(template.icon);
  this.onClick = L.Util.bind(template.onClick?template.onClick:function(){}, easyButton);
}
function State(template, easyButton){

  this.title = template.title;
  this.stateName = template.stateName ? template.stateName : 'unnamed-state';

  // build the wrapper
  this.icon = L.DomUtil.create('span', '');

  L.DomUtil.addClass(this.icon, 'button-state state-' + this.stateName.replace(/(^\s*|\s*$)/g,''));
  this.icon.innerHTML = buildIcon(template.icon);
  this.onClick = L.Util.bind(template.onClick?template.onClick:function(){}, easyButton);
}
function State ( template , easyButton ) { this . title = template . title ; this . stateName = template . stateName ? template . stateName : 'unnamed-state' ; // build the wrapper this . icon = L . DomUtil . create ( 'span' , '' ) ; L . DomUtil . addClass ( this . icon , 'button-state state-' + this . stateName . replace ( / (^\s*|\s*$) / g , '' ) ) ; this . icon . innerHTML = buildIcon ( template . icon ) ; this . onClick = L . Util . bind ( template . onClick ? template . onClick : function ( ) { } , easyButton ) ; }
constructor for states so only curated states end up getting called
constructor for states so only curated states end up getting called