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 | |
---|
1 | define(["dojo/_base/declare","./AnalogIndicatorBase"], |
---|
2 | function(declare, AnalogIndicatorBase) { |
---|
3 | |
---|
4 | /*===== |
---|
5 | AnalogIndicatorBase = dojox.gauges.AnalogIndicatorBase; |
---|
6 | =====*/ |
---|
7 | |
---|
8 | return declare("dojox.gauges.AnalogLineIndicator", [AnalogIndicatorBase], { |
---|
9 | // summary: |
---|
10 | // An indicator for the AnalogGauge that draws a segment of line that has for length the length of the indicator |
---|
11 | // and that starts at an offset from the center of the gauge. The line is drawn on the angle that corresponds |
---|
12 | // to the value of the indicator. |
---|
13 | |
---|
14 | _getShapes: function(/*dojox.gfx.Group*/ group){ |
---|
15 | // summary: |
---|
16 | // Private function for generating the shapes for this indicator. An indicator that behaves the |
---|
17 | // same might override this one and simply replace the shapes (such as ArrowIndicator). |
---|
18 | var direction = this.direction; |
---|
19 | var length = this.length; |
---|
20 | if (direction == 'inside') |
---|
21 | length = - length; |
---|
22 | |
---|
23 | return [group.createLine({x1: 0, y1: -this.offset, x2: 0, y2: -length-this.offset}) |
---|
24 | .setStroke({color: this.color, width: this.width})]; |
---|
25 | } |
---|
26 | |
---|
27 | }); |
---|
28 | |
---|
29 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.