Sha256: 531a50ca9c0c699855d5ac256693cb0bb2af64323d4f7bc83b47e4d9a7a5f9f0

Contents?: true

Size: 1.17 KB

Versions: 7

Compression:

Stored size: 1.17 KB

Contents

/*   Riassence Framework
 *   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.
  **
***/
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);
      this.setStyleOfPart('value','width',_progressWidth+'px');
    }
  },
  onIdle: function(){
    this.base();
    this.refreshValue();
  }
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rsence-2.0.0.5.pre js/controls/progress/progressbar/progressbar.js
rsence-2.0.0.4.pre js/controls/progress/progressbar/progressbar.js
rsence-2.0.0.3.pre js/controls/progress/progressbar/progressbar.js
rsence-2.0.0.2.pre js/controls/progress/progressbar/progressbar.js
rsence-2.0.0.1.pre js/controls/progress/progressbar/progressbar.js
rsence-2.0.0.0.pre js/controls/progress/progressbar/progressbar.js
rsence-2.0.0.pre js/controls/progress/progressbar/progressbar.js