CircularGauge.js 991 Bytes
//>>built
define(["dojo/_base/declare","dojo/dom-geometry","dojox/gfx","./GaugeBase"],function(l,m,g,n){return l("dojox.dgauges.CircularGauge",n,{_transformProperties:null,refreshRendering:function(){if(!(0>=this._widgetBox.w||0>=this._widgetBox.h)){for(var b in this._elementsIndex)this._elementsRenderers[b]=this._elementsIndex[b].refreshRendering();var a=this._computeBoundingBox(this._gfxGroup),c=(a.x+a.width)/(a.y+a.height),h=this._widgetBox.w,k=this._widgetBox.h,f=b=0,d=0,e=0;c>this._widgetBox.w/this._widgetBox.h?
(e=h,d=e/c,f=(k-d)/2):(d=k,e=d*c,b=(h-e)/2);a=Math.max(e/(a.x+a.width),d/(a.y+a.height));this._transformProperties={scale:a,tx:b,ty:f};this._gfxGroup.setTransform([g.matrix.scale(a),g.matrix.translate(b/a,f/a)])}},_gaugeToPage:function(b,a){if(this._transformProperties){var c=m.position(this.domNode,!0);return{x:c.x+b*this._transformProperties.scale+this._transformProperties.tx,y:c.y+a*this._transformProperties.scale+this._transformProperties.ty}}return null}})});