/*** = Description ** Simple small menu component for selecting one value amongst several. ** It's limited to 15px height by the default theme. ***/ var//RSence.Menus HMiniMenu = HRadioButtonList.extend({ componentName: 'minimenu', defaultEvents: { draggable: true, mouseUp: true, click: true, resize: true }, subComponentHeight: 15, resize: function(){ this.repositionMenuItems(); }, repositionMenuItems: function(){ var x = this.pageX(), y = this.pageY(), w = this.rect.width, _listItems = this.listItems ? (this.listItems.length ? this.listItems : {length:0} ) : {length:0}, h = _listItems.length*this.subComponentHeight, i = 0; y -= this.rect.height; y -= (i-1)*this.subComponentHeight; if(y < 0){ y = this.subComponentHeight%y; } if(this.options.menuItemGeom){ if(this.options.menuItemGeom.width){ w += this.options.menuItemGeom.width; } if(this.options.menuItemGeom.width){ x += this.options.menuItemGeom.left; } } var mw = x+w, mh = y+h; this._menuItemViewShowPos = [ x, y ]; this._menuItemViewHidePos = [ 0-mw, 0-mh ]; this.menuItemView.rect.set( x, y, mw, mh ); this.menuItemView.offsetTo( 0-mw, 0-mh ); this.menuItemView.refresh(); this.menuItemView.hide(); }, click: function(){ if(!this.active){return false;} if( ELEM.getStyle(this.menuItemView.elemId,'visibility',true) === 'hidden' ) { this.menuShow(); }else{ this.menuHide(); } return false; }, refreshValue: function(){ this.base(); if(this.listItems && this.listItems.length !== 0 && this.valueMatrix !== undefined ) { for(var i=0;i