source: Dev/branches/rest-dojo-ui/client/dojox/charting/action2d/ChartAction.js @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 1.1 KB
Line 
1define(["dojo/_base/connect", "dojo/_base/declare", "./Base"],
2        function(hub, declare, Base){
3        /*=====
4        var Base = dojox.charting.action2d.Base;
5        =====*/
6        return declare("dojox.charting.action2d.ChartAction", Base, {
7                //      summary:
8                //              Base action class for chart actions.
9       
10                constructor: function(chart, plot){
11                        //      summary:
12                        //              Create a new base chart action.
13                        //      chart: dojox.charting.Chart
14                        //              The chart this action applies to.
15                        //      plot: String?|dojox.charting.plot2d.Base?
16                        //              Optional target plot for this chart action.  Default is "default".
17                },
18       
19                connect: function(){
20                        //      summary:
21                        //              Connect this action to the chart.
22                        for(var i = 0; i < this._listeners.length; ++i){
23                                this._listeners[i].handle = hub.connect(this.chart.node, this._listeners[i].eventName,
24                                                this, this._listeners[i].methodName);
25                        }
26                },
27       
28                disconnect: function(){
29                        //      summary:
30                        //              Disconnect this action from the chart.
31                        for(var i = 0; i < this._listeners.length; ++i){
32                                hub.disconnect(this._listeners[i].handle);
33                                delete this._listeners[i].handle;
34                        }
35                }
36});
37
38});
Note: See TracBrowser for help on using the repository browser.