Sha256: a9d4e1f06dc5795bfc317b01d0418f099857105411ac9103b0afaac870973fbf

Contents?: true

Size: 1.24 KB

Versions: 98

Compression:

Stored size: 1.24 KB

Contents

/*   RSence
 *   Copyright 2006 Riassence Inc.
 *   http://riassence.com/
 *
 *   You should have received a copy of the GNU General Public License along
 *   with this software package. If not, contact licensing@riassence.com
 */

/*** = Description
  ** HProgressBar is a control unit used to convey the progress of a task, 
  ** such as a download or file transfer. In other words, it is a component 
  ** indicating a percentage of a total task has completed.
  **
  ** Use the maxValue to define the point of progress at the end and use value
  ** to define the point of progress.
  **
***/
var//RSence.Controls
HProgressBar = HControl.extend({
  componentName: "progressbar",
  
/** The amount of pixels the theme insets the width of the progress bar **/
  themeWidthInset: 2,
  
/** Sets the width of the progress bar when the value changes. **/
  refreshValue: function(){
    if( this.drawn && this.markupElemIds.value ){
      var _visibleWidth = this.rect.width-this.themeWidthInset,
          _progressWidth = Math.round(_visibleWidth * this.value);
      if(_progressWidth<0){
        _progressWidth = 0;
      }
      this.setStyleOfPart('value','width',_progressWidth+'px');
    }
  },
  onIdle: function(){
    this.base();
    this.refreshValue();
  }
});

Version data entries

98 entries across 98 versions & 2 rubygems

Version Path
rsence-pre-2.2.0.21 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.20 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.19 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.18 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.17 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.16 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.15 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.14 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.13 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.12 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.11 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.10 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.9 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.8 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.7 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.5 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.4 js/controls/progress/progressbar/progressbar.js
rsence-2.1.11 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.3 js/controls/progress/progressbar/progressbar.js
rsence-pre-2.2.0.2 js/controls/progress/progressbar/progressbar.js