3 <title>The source code</title>
4 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
5 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
7 <body onload="prettyPrint();">
8 <pre class="prettyprint lang-js"><div id="cls-Ext.ux.SliderTip"></div>/**
\r
9 * @class Ext.ux.SliderTip
\r
11 * Simple plugin for using an Ext.Tip with a slider to show the slider value
\r
13 Ext.ux.SliderTip = Ext.extend(Ext.Tip, {
\r
16 init : function(slider){
\r
17 slider.on('dragstart', this.onSlide, this);
\r
18 slider.on('drag', this.onSlide, this);
\r
19 slider.on('dragend', this.hide, this);
\r
20 slider.on('destroy', this.destroy, this);
\r
23 onSlide : function(slider){
\r
25 this.body.update(this.getText(slider));
\r
27 this.el.alignTo(slider.thumb, 'b-t?', this.offsets);
\r
30 getText : function(slider){
\r
31 return String(slider.getValue());
\r