X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/docs/source/Slider.html diff --git a/docs/source/Slider.html b/docs/source/Slider.html new file mode 100644 index 00000000..33da4356 --- /dev/null +++ b/docs/source/Slider.html @@ -0,0 +1,66 @@ + + + + + The source code + + + + + + +
/**
+ * @class Ext.layout.component.field.Slider
+ * @extends Ext.layout.component.field.Field
+ * @private
+ */
+
+Ext.define('Ext.layout.component.field.Slider', {
+
+    /* Begin Definitions */
+
+    alias: ['layout.sliderfield'],
+
+    extend: 'Ext.layout.component.field.Field',
+
+    /* End Definitions */
+
+    type: 'sliderfield',
+
+    sizeBodyContents: function(width, height) {
+        var owner = this.owner,
+            thumbs = owner.thumbs,
+            length = thumbs.length,
+            inputEl = owner.inputEl,
+            innerEl = owner.innerEl,
+            endEl = owner.endEl,
+            i = 0;
+
+        /*
+         * If we happen to be animating during a resize, the position of the thumb will likely be off
+         * when the animation stops. As such, just stop any animations before syncing the thumbs.
+         */
+        for(; i < length; ++i) {
+            thumbs[i].el.stopAnimation();
+        }
+        
+        if (owner.vertical) {
+            inputEl.setHeight(height);
+            innerEl.setHeight(Ext.isNumber(height) ? height - inputEl.getPadding('t') - endEl.getPadding('b') : height);
+        }
+        else {
+            inputEl.setWidth(width);
+            innerEl.setWidth(Ext.isNumber(width) ? width - inputEl.getPadding('l') - endEl.getPadding('r') : width);
+        }
+        owner.syncThumbs();
+    }
+});
+
+ +