Sha256: a5a1499edf617d3e6d76b9b73c63a7cdd16b50773752ee2dc7bac4520f0a49d6

Contents?: true

Size: 1.59 KB

Versions: 89

Compression:

Stored size: 1.59 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
  ** A progress indicator is the indeterminate progress bar, which is used in 
  ** situations where the extent of the task is unknown or the progress of 
  ** the task can not be determined in a way that could be expressed as a 
  ** percentage. This bar uses motion or some other indicator to show that 
  ** progress is taking place, rather than using the size of the filled portion
  ** to show the total amount of progress.
  ***/
var//RSence.Controls
HProgressIndicator = HView.extend({
  _indicator: null,
  _animDirection: 0,
  drawSubviews: function(){
    var _this = this,
    _rect = _this.rect,
    _height = _rect.height,
    _width = _rect.width;
    _width -= 2;
    _this.setStyle( 'border', '1px solid #999' );
    _this.setStyle( 'background-color', '#ccc' );
    _this['_rect'+0] = HRect.nu( 0,0,_height,_height );
    _this['_rect'+1] = HRect.nu( _width-_height, 0, _width, _height );
    _this._indicator = HView.nu( HRect.nu( _this['_rect'+0] ), _this );
    _this._indicator.setStyle('background-color','#333');
    _this._indicator.onAnimationEnd = function(){
      this.parent._toggleDirection();
    };
    _this._toggleDirection();
  },
  _toggleDirection: function(){
    this._animDirection = this._animDirection===1?0:1;
    var _directionRect = HRect.nu( this['_rect'+this._animDirection] );
    this._indicator.animateTo(_directionRect);
  }
});

Version data entries

89 entries across 89 versions & 2 rubygems

Version Path
rsence-pre-2.3.0.15 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.14 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.13 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.12 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.11 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.10 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.9 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.8 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.7 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.6 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.5 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.4 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.3 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.2 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.1 js/controls/progress/progressindicator/progressindicator.js
rsence-pre-2.3.0.0 js/controls/progress/progressindicator/progressindicator.js
rsence-2.2.5 js/controls/progress/progressindicator/progressindicator.js
rsence-2.2.4 js/controls/progress/progressindicator/progressindicator.js
rsence-2.2.3 js/controls/progress/progressindicator/progressindicator.js
rsence-2.2.2 js/controls/progress/progressindicator/progressindicator.js