define("dojox/dgauges/GaugeBase", ["dojo/_base/lang", "dojo/_base/declare", "dojo/dom-geometry", "dijit/registry", "dijit/_WidgetBase", "dojo/_base/html", "dojo/_base/event", "dojox/gfx", "dojox/widget/_Invalidating","./ScaleBase", "dojox/gfx/matrix"], function(lang, // lang.extend declare, domGeom, WidgetRegistry, _WidgetBase, html, event, gfx, _Invalidating, ScaleBase, matrix){ return declare("dojox.dgauges.GaugeBase", [_WidgetBase, _Invalidating], { // summary: // This class is the base class for the circular and // rectangular (horizontal and vertical) gauge components. // A gauge is a composition of elements added to the gauge using the addElement method. // Elements are drawn from back to front in the same order they are added (using addElement). // An elements can be: // // - A GFX drawing functions typically used for defining the style of the gauge. // - A scale: CircularScale or RectangularScale depending on the type of gauge. // - A text, using the TextIndicator // Note: Indicator classes (value indicators, range indicators) are sub-elements of scales // To create a custom gauge, subclass CircularGauge or RectangularGauge and // configure its elements in the constructor. // Ready to use, predefined gauges are available in dojox/dgauges/components/ // They are good examples of gauges built on top of the framework. _elements: null, _scales: null, _elementsIndex: null, _elementsRenderers: null, _gfxGroup: null, _mouseShield: null, _widgetBox: null, _node: null, // value: Number // This property acts as a top-level wrapper for the value of the first indicator added to // its scale with the name "indicator", i.e. myScale.addIndicator("indicator", myIndicator). // This property must be manipulated with get("value") and set("value", xxx). value: 0, _mainIndicator: null, _getValueAttr: function(){ // summary: // Internal method. // tags: // private if(this._mainIndicator){ return this._mainIndicator.get("value"); }else{ this._setMainIndicator(); if(this._mainIndicator){ return this._mainIndicator.get("value"); } } return this.value; }, _setValueAttr: function(value){ // summary: // Internal method. // tags: // private this._set("value", value); if(this._mainIndicator){ this._mainIndicator.set("value", value); }else{ this._setMainIndicator(); if(this._mainIndicator){ this._mainIndicator.set("value", value); } } }, _setMainIndicator: function(){ // summary: // Internal method. // tags: // private var indicator; for(var i=0; i