X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Multi.html
diff --git a/docs/source/Multi.html b/docs/source/Multi.html
index b7110202..b2608242 100644
--- a/docs/source/Multi.html
+++ b/docs/source/Multi.html
@@ -19,7 +19,7 @@
* @class Ext.slider.Multi
* @extends Ext.form.field.Base
* <p>Slider which supports vertical or horizontal orientation, keyboard adjustments, configurable snapping, axis
- * clicking and animation. Can be added as an item to any container. In addition,
+ * clicking and animation. Can be added as an item to any container. In addition,
* {@img Ext.slider.Multi/Ext.slider.Multi.png Ext.slider.Multi component}
* <p>Example usage:</p>
* Sliders can be created with more than one thumb handle by passing an array of values instead of a single one:
@@ -34,9 +34,8 @@
//this defaults to true, setting to false allows the thumbs to pass each other
{@link #constrainThumbs}: false,
renderTo: Ext.getBody()
- });
+ });
</pre>
- * @xtype multislider
*/
Ext.define('Ext.slider.Multi', {
extend: 'Ext.form.field.Base',
@@ -176,7 +175,7 @@ Ext.define('Ext.slider.Multi', {
var me = this,
tipPlug,
hasTip;
-
+
/**
* @property thumbs
* @type Array
@@ -297,7 +296,7 @@ Ext.define('Ext.slider.Multi', {
var thumbs = this.thumbs,
ln = thumbs.length,
zIndex, thumb, i;
-
+
for (i = 0; i < ln; i++) {
thumb = thumbs[i];
@@ -359,7 +358,7 @@ Ext.define('Ext.slider.Multi', {
*/
initEvents : function() {
var me = this;
-
+
me.mon(me.el, {
scope : me,
mousedown: me.onMouseDown,
@@ -383,7 +382,7 @@ Ext.define('Ext.slider.Multi', {
thumbs = me.thumbs,
len = thumbs.length,
local;
-
+
if (me.disabled) {
return;
}
@@ -409,7 +408,7 @@ Ext.define('Ext.slider.Multi', {
onClickChange : function(local) {
var me = this,
thumb, index;
-
+
if (local.top > me.clickRange[0] && local.top < me.clickRange[1]) {
//find the nearest thumb to the click event
thumb = me.getNearest(local, 'left');
@@ -470,13 +469,13 @@ Ext.define('Ext.slider.Multi', {
var me = this,
k,
val;
-
+
if(me.disabled || me.thumbs.length !== 1) {
e.preventDefault();
return;
}
k = e.getKey();
-
+
switch(k) {
case e.UP:
case e.RIGHT:
@@ -495,33 +494,6 @@ Ext.define('Ext.slider.Multi', {
}
},
- /**
- * @private
- * If using snapping, this takes a desired new value and returns the closest snapped
- * value to it
- * @param {Number} value The unsnapped value
- * @return {Number} The value of the nearest snap target
- */
- doSnap : function(value) {
- var newValue = value,
- inc = this.increment,
- m;
-
- if (!(inc && value)) {
- return value;
- }
- m = value % inc;
- if (m !== 0) {
- newValue -= m;
- if (m * 2 >= inc) {
- newValue += inc;
- } else if (m * 2 < -inc) {
- newValue -= inc;
- }
- }
- return Ext.Number.constrain(newValue, this.minValue, this.maxValue);
- },
-
// private
afterRender : function() {
var me = this,
@@ -530,7 +502,7 @@ Ext.define('Ext.slider.Multi', {
len = thumbs.length,
thumb,
v;
-
+
me.callParent(arguments);
for (; i < len; i++) {
@@ -568,8 +540,8 @@ Ext.define('Ext.slider.Multi', {
*/
normalizeValue : function(v) {
var me = this;
-
- v = me.doSnap(v);
+
+ v = Ext.Number.snap(v, this.increment, this.minValue, this.maxValue);
v = Ext.util.Format.round(v, me.decimalPrecision);
v = Ext.Number.constrain(v, me.minValue, me.maxValue);
return v;
@@ -586,7 +558,7 @@ Ext.define('Ext.slider.Multi', {
thumbs = me.thumbs,
len = thumbs.length,
t;
-
+
me.minValue = val;
me.inputEl.dom.setAttribute('aria-valuemin', val);
@@ -608,7 +580,7 @@ Ext.define('Ext.slider.Multi', {
thumbs = me.thumbs,
len = thumbs.length,
t;
-
+
me.maxValue = val;
me.inputEl.dom.setAttribute('aria-valuemax', val);
@@ -688,7 +660,7 @@ Ext.define('Ext.slider.Multi', {
thumb,
el,
xy;
-
+
me.callParent();
for (; i < len; i++) {
@@ -722,7 +694,7 @@ Ext.define('Ext.slider.Multi', {
len = thumbs.length,
thumb,
el;
-
+
this.callParent();
for (; i < len; i++) {
@@ -808,7 +780,7 @@ Ext.define('Ext.slider.Multi', {
// private
beforeDestroy : function() {
var me = this;
-
+
Ext.destroyMembers(me.innerEl, me.endEl, me.focusEl);
Ext.each(me.thumbs, function(thumb) {
Ext.destroy(thumb);