UNPKG

dojox

Version:

Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.

30 lines (26 loc) 911 B
define(["dojo/_base/declare"], function(declare){ // module: // dojox/charting/bidi/widget/Chart function validateTextDir(textDir){ return /^(ltr|rtl|auto)$/.test(textDir) ? textDir : null; } return declare(null, { postMixInProperties: function(){ // set initial textDir of the chart, if passed in the creation use that value // else use default value, following the GUI direction, this.chart doesn't exist yet // so can't use set("textDir", textDir). This passed to this.chart in it's future creation. this.textDir = this.params["textDir"] ? this.params["textDir"] : this.params["dir"]; }, _setTextDirAttr: function(/*String*/ textDir){ if(validateTextDir(textDir) != null){ this._set("textDir", textDir); this.chart.setTextDir(textDir); } }, _setDirAttr: function(/*String*/ dir){ this._set("dir", dir); this.chart.setDir(dir); } }); });