summaryrefslogtreecommitdiff
path: root/js/dojo-1.6/dojox/widget/gauge/AnalogArrowIndicator.xd.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo-1.6/dojox/widget/gauge/AnalogArrowIndicator.xd.js')
-rw-r--r--js/dojo-1.6/dojox/widget/gauge/AnalogArrowIndicator.xd.js53
1 files changed, 53 insertions, 0 deletions
diff --git a/js/dojo-1.6/dojox/widget/gauge/AnalogArrowIndicator.xd.js b/js/dojo-1.6/dojox/widget/gauge/AnalogArrowIndicator.xd.js
new file mode 100644
index 0000000..fee7656
--- /dev/null
+++ b/js/dojo-1.6/dojox/widget/gauge/AnalogArrowIndicator.xd.js
@@ -0,0 +1,53 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", 'dojox.widget.gauge.AnalogArrowIndicator'],
+["require", 'dojox.widget.AnalogGauge']],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource['dojox.widget.gauge.AnalogArrowIndicator']){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource['dojox.widget.gauge.AnalogArrowIndicator'] = true;
+dojo.provide('dojox.widget.gauge.AnalogArrowIndicator');
+dojo.require('dojox.widget.AnalogGauge');
+
+dojo.experimental("dojox.widget.gauge.AnalogArrowIndicator");
+
+dojo.declare("dojox.widget.gauge.AnalogArrowIndicator",[dojox.widget.gauge.AnalogLineIndicator],{
+ _getShapes: function(){
+ // summary:
+ // Override of dojox.widget.AnalogLineIndicator._getShapes
+ if(!this._gauge){
+ return null;
+ }
+ var x = Math.floor(this.width/2);
+ var head = this.width * 5;
+ var odd = (this.width & 1);
+ var shapes = [];
+ var points = [{x:-x, y:0},
+ {x:-x, y:-this.length+head},
+ {x:-2*x, y:-this.length+head},
+ {x:0, y:-this.length},
+ {x:2*x+odd,y:-this.length+head},
+ {x:x+odd, y:-this.length+head},
+ {x:x+odd, y:0},
+ {x:-x, y:0}];
+ shapes[0] = this._gauge.surface.createPolyline(points)
+ .setStroke({color: this.color})
+ .setFill(this.color);
+ shapes[1] = this._gauge.surface.createLine({ x1:-x, y1: 0, x2: -x, y2:-this.length+head })
+ .setStroke({color: this.highlight});
+ shapes[2] = this._gauge.surface.createLine({ x1:-x-3, y1: -this.length+head, x2: 0, y2:-this.length })
+ .setStroke({color: this.highlight});
+ shapes[3] = this._gauge.surface.createCircle({cx: 0, cy: 0, r: this.width})
+ .setStroke({color: this.color})
+ .setFill(this.color);
+ return shapes;
+ }
+});
+
+}
+
+}};});