if(this.shape.length){ //TODO: i18n // var label = dojox.sketch.shapes[this.shape]; var className = this.iconClassPrefix+" "+this.iconClassPrefix + this.shape.charAt(0).toUpperCase() + this.shape.substr(1); if(!this.button){ var props = { label: this.shape, showLabel: false, iconClass: className, dropDown: this.dropDown, tabIndex: "-1" }; this.button = new this.buttonClass(props); this.connect(this.button,'onClick','activate'); } }