4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-layout-component-field-Slider'>/**
19 </span> * @class Ext.layout.component.field.Slider
20 * @extends Ext.layout.component.field.Field
24 Ext.define('Ext.layout.component.field.Slider', {
26 /* Begin Definitions */
28 alias: ['layout.sliderfield'],
30 extend: 'Ext.layout.component.field.Field',
36 sizeBodyContents: function(width, height) {
37 var owner = this.owner,
38 thumbs = owner.thumbs,
39 length = thumbs.length,
40 inputEl = owner.inputEl,
41 innerEl = owner.innerEl,
46 * If we happen to be animating during a resize, the position of the thumb will likely be off
47 * when the animation stops. As such, just stop any animations before syncing the thumbs.
49 for(; i < length; ++i) {
50 thumbs[i].el.stopAnimation();
54 inputEl.setHeight(height);
55 innerEl.setHeight(Ext.isNumber(height) ? height - inputEl.getPadding('t') - endEl.getPadding('b') : height);
58 inputEl.setWidth(width);
59 innerEl.setWidth(Ext.isNumber(width) ? width - inputEl.getPadding('l') - endEl.getPadding('r') : width);