Debian Codegraph @

dojox/charting/bidi/widget/Chart.js

raw symbols SCIP
1 define(["dojo/_base/declare"],
2 function(declare){
3 // module:
4 // dojox/charting/bidi/widget/Chart
5 function validateTextDir(textDir){
6 return /^(ltr|rtl|auto)$/.test(textDir) ? textDir : null;
7 }
8
9 return declare(null, {
10 postMixInProperties: function(){
11 // set initial textDir of the chart, if passed in the creation use that value
12 // else use default value, following the GUI direction, this.chart doesn't exist yet
13 // so can't use set("textDir", textDir). This passed to this.chart in it's future creation.
14 this.textDir = this.params["textDir"] ? this.params["textDir"] : this.params["dir"];
15 },
16
17 _setTextDirAttr: function(/*String*/ textDir){
18 if(validateTextDir(textDir) != null){
19 this._set("textDir", textDir);
20 this.chart.setTextDir(textDir);
21 }
22 },
23
24 _setDirAttr: function(/*String*/ dir){
25 this._set("dir", dir);
26 this.chart.setDir(dir);
27 }
28 });
29 });