source: Dev/branches/rest-dojo-ui/client/dojox/gauges/AnalogCircleIndicator.js @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 1.0 KB
Line 
1define(["dojo/_base/declare","./AnalogIndicatorBase"],
2  function(declare, AnalogIndicatorBase) {
3
4/*=====
5        AnalogIndicatorBase = dojox.gauges.AnalogIndicatorBase;
6=====*/
7
8return declare("dojox.gauges.AnalogCircleIndicator", [AnalogIndicatorBase], {
9        // summary:
10        //              An indicator for the AnalogGauge that draws a circle. The center of the circle is positioned
11        //              on the circular gauge according to the value of the indicator. The circle has for radius the
12        //              length of the indicator. This indicator is mainly used to draw round ticks for the scale.
13       
14       
15        _getShapes: function(group){
16                // summary:
17                //              Override of dojox.gauges.AnalogLineIndicator._getShapes
18                var color = this.color ? this.color : 'black';
19                var strokeColor = this.strokeColor ? this.strokeColor : color;
20                var stroke = {
21                        color: strokeColor,
22                        width: 1
23                };
24                if (this.color.type && !this.strokeColor){
25                        stroke.color = this.color.colors[0].color;
26                }
27               
28                return [group.createCircle({
29                        cx: 0,
30                        cy: -this.offset,
31                        r: this.length
32                }).setFill(color).setStroke(stroke)];
33        }
34});
35});
Note: See TracBrowser for help on using the repository browser.