| 1 |
define(["dojo/_base/declare"], |
| 2 |
function(declare){ |
| 3 |
|
| 4 |
|
| 5 |
function validateTextDir(textDir){ |
| 6 |
return /^(ltr|rtl|auto)$/.test(textDir) ? textDir : null; |
| 7 |
} |
| 8 |
|
| 9 |
return declare(null, { |
| 10 |
postMixInProperties: function(){ |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
this.textDir = this.params["textDir"] ? this.params["textDir"] : this.params["dir"]; |
| 15 |
}, |
| 16 |
|
| 17 |
_setTextDirAttr: function( textDir){ |
| 18 |
if(validateTextDir(textDir) != null){ |
| 19 |
this._set("textDir", textDir); |
| 20 |
this.chart.setTextDir(textDir); |
| 21 |
} |
| 22 |
}, |
| 23 |
|
| 24 |
_setDirAttr: function( dir){ |
| 25 |
this._set("dir", dir); |
| 26 |
this.chart.setDir(dir); |
| 27 |
} |
| 28 |
}); |
| 29 |
}); |