source: trunk/web/addons/job_monarch/lib/extjs/examples/slider/SliderTip.js @ 619

Last change on this file since 619 was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 883 bytes
Line 
1/*
2 * Ext JS Library 2.2.1
3 * Copyright(c) 2006-2009, Ext JS, LLC.
4 * licensing@extjs.com
5 *
6 * http://extjs.com/license
7 */
8
9
10/**
11 * @class Ext.ux.SliderTip
12 * @extends Ext.Tip
13 * Simple plugin for using an Ext.Tip with a slider to show the slider value
14 */
15Ext.ux.SliderTip = Ext.extend(Ext.Tip, {
16    minWidth: 10,
17    offsets : [0, -10],
18    init : function(slider){
19        slider.on('dragstart', this.onSlide, this);
20        slider.on('drag', this.onSlide, this);
21        slider.on('dragend', this.hide, this);
22        slider.on('destroy', this.destroy, this);
23    },
24
25    onSlide : function(slider){
26        this.show();
27        this.body.update(this.getText(slider));
28        this.doAutoWidth();
29        this.el.alignTo(slider.thumb, 'b-t?', this.offsets);
30    },
31
32    getText : function(slider){
33        return slider.getValue();
34    }
35});
Note: See TracBrowser for help on using the repository browser.