summaryrefslogtreecommitdiff
path: root/js/dojo/dojox/gauges/AnalogCircleIndicator.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo/dojox/gauges/AnalogCircleIndicator.js')
-rw-r--r--js/dojo/dojox/gauges/AnalogCircleIndicator.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/js/dojo/dojox/gauges/AnalogCircleIndicator.js b/js/dojo/dojox/gauges/AnalogCircleIndicator.js
new file mode 100644
index 0000000..12a9da3
--- /dev/null
+++ b/js/dojo/dojox/gauges/AnalogCircleIndicator.js
@@ -0,0 +1,36 @@
+//>>built
+define("dojox/gauges/AnalogCircleIndicator", ["dojo/_base/declare","./AnalogIndicatorBase"],
+ function(declare, AnalogIndicatorBase) {
+
+/*=====
+ AnalogIndicatorBase = dojox.gauges.AnalogIndicatorBase;
+=====*/
+
+return declare("dojox.gauges.AnalogCircleIndicator", [AnalogIndicatorBase], {
+ // summary:
+ // An indicator for the AnalogGauge that draws a circle. The center of the circle is positioned
+ // on the circular gauge according to the value of the indicator. The circle has for radius the
+ // length of the indicator. This indicator is mainly used to draw round ticks for the scale.
+
+
+ _getShapes: function(group){
+ // summary:
+ // Override of dojox.gauges.AnalogLineIndicator._getShapes
+ var color = this.color ? this.color : 'black';
+ var strokeColor = this.strokeColor ? this.strokeColor : color;
+ var stroke = {
+ color: strokeColor,
+ width: 1
+ };
+ if (this.color.type && !this.strokeColor){
+ stroke.color = this.color.colors[0].color;
+ }
+
+ return [group.createCircle({
+ cx: 0,
+ cy: -this.offset,
+ r: this.length
+ }).setFill(color).setStroke(stroke)];
+ }
+});
+});