source: Dev/trunk/src/client/dojox/gauges/GlossyCircularGaugeNeedle.js @ 532

Last change on this file since 532 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.5 KB
Line 
1define(["dojo/_base/declare","dojo/_base/Color" ,"./AnalogIndicatorBase"],
2  function(declare, Color, AnalogIndicatorBase) {
3
4
5return declare("dojox.gauges.GlossyCircularGaugeNeedle", [AnalogIndicatorBase], {
6        // summary:
7        //              The needle for the dojox.gauges.GlossyCircularGauge and
8        //              dojox.gauges.GlossySemiCircularGauge.
9        //
10        // description:
11        //              This object defines the needle for the dojox.gauges.GlossyCircularGauge and
12        //              dojox.gauges.GlossySemiCircularGauge.
13        //              Since the needle is created by the gauges class, you do not have to use this class directly.
14       
15       
16        interactionMode: "gauge",
17       
18        // color: String
19        //              The color of the indicator.
20        color: '#c4c4c4',
21       
22        _getShapes: function(group){
23                // summary:
24                //              Overrides AnalogIndicatorBase._getShapes
25               
26                var darkerColor = Color.blendColors(new Color(this.color), new Color('black'), 0.3);
27               
28                if (!this._gauge)
29                        return null;
30               
31                var shapes = [];
32                shapes[0] = group.createGroup();
33                var scale = Math.min((this._gauge.width / this._gauge._designWidth), (this._gauge.height / this._gauge._designHeight));
34                shapes[0].createGroup().setTransform({
35                        xx: scale,
36                        xy: 0,
37                        yx: 0,
38                        yy: scale,
39                        dx: 0,
40                        dy: 0
41                });
42                shapes[0].children[0].createPath({
43                        path: "M357.1429 452.005 L333.0357 465.9233 L333.0357 438.0868 L357.1429 452.005 Z"
44                }).setTransform({
45                        xx: 0,
46                        xy: 1,
47                        yx: -6.21481,
48                        yy: 0,
49                        dx: -452.00505,
50                        dy: 2069.75519
51                }).setFill(this.color).setStroke({
52                        color: darkerColor,
53                        width: 1,
54                        style: "Solid",
55                        cap: "butt",
56                        join: 20.0
57                });
58                return shapes;
59        }
60});
61});
Note: See TracBrowser for help on using the repository browser.