//have to adjust thumb once at start because
//neither setValue nor onvalue is getting triggered
//when value is set.
_adjustThumb();
return minvalue;
return maxvalue;
if (this.minvalue == v) return;
this.minvalue = v;
if (onminvalue) onminvalue.sendEvent();
//adjust value
if (this.minvalue > this.value) this.setAttribute("value",v);
_adjustThumb();
if (this.maxvalue == v) return;
this.maxvalue = v;
if (onmaxvalue) onmaxvalue.sendEvent();
//adjust value
if (this.value > v) this.setAttribute("value",v);
_adjustThumb();
if (this.value == v) return;
// ensure in bounds
v = Math.max(v,this.minvalue);
v = Math.min(v,this.maxvalue);
this.value = v;
if (onvalue) onvalue.sendEvent();
if (!isinited) return;
_adjustThumb();
var diff = this.minvalue-this.maxvalue;
setValue( diff*p + this.minvalue );
return (this.value-this.minvalue) / (this.maxvalue-this.minvalue);
var perc = getPercentage();
var x = Math.round( (this.width-track.thumb.width)*perc );
track.thumb.setX(x);
//left arrow
if (k==37) this.track.thumb.setX(this.track.thumb.x-keystep);
else
//right arrow
if (k==39) this.track.thumb.setX(this.track.thumb.x+keystep);
var fx = this.getAttributeRelative('x',canvas);
var fy = this.getAttributeRelative('y',canvas) - 4;
var fw = this.getAttributeRelative('width',canvas) + 2;
var fh = this.getAttributeRelative('height',canvas) + 6;
return [fx,fy,fw,fh];
classroot.track = this;
var boundedx = x;
if ( x > parent.getWidth()-getWidth() ) {
var constrainX = parent.getWidth()-getWidth();
boundedx = constrainX;
} else
if (parent.x > x) {
boundedx = parent.x;
}
super.setX(boundedx);
//update slider value
var perc = ( (x) / (parent.parent.width-width) );
var val = Math.round( (((perc)*(parent.parent.maxvalue-parent.parent.minvalue))+parseFloat(parent.parent.minvalue))
* Math.pow(10,parent.parent.precision) ) / Math.pow(10,parent.parent.precision) ;
//only adjust value if user is dragging or left or right key is pressed
if (thedragstate.isapplied || LzKeys.isKeyDown("leftarrow") || LzKeys.isKeyDown("rightarrow") ) {
parent.parent.setValue(val);
}