11/**
2+ * @fileOverview
23 * @author Bart van Vliet - [email protected] 34 */
45
78 * Aims to the left at 0 rotation, as would be expected.
89 *
910 * @constructor
10- * @param options - object with following keys:
11- * * size (optional) - the size of the marker
12- * * strokeSize (optional) - the size of the outline
13- * * strokeColor (optional) - the createjs color for the stroke
14- * * fillColor (optional) - the createjs color for the fill
15- * * pulse (optional) - if the marker should "pulse" over time
11+ * @param { Object } options
12+ * @param { Int } [options. size] - The size of the marker
13+ * @param { Int } [options. strokeSize] - The size of the outline
14+ * @param { String } [options. strokeColor] - The createjs color for the stroke
15+ * @param { String } [options. fillColor] - The createjs color for the fill
16+ * @param { Bool } [options. pulse] - If the marker should "pulse" over time
1617 */
1718ROS2D . ArrowShape = function ( options ) {
1819 var that = this ;
@@ -22,29 +23,29 @@ ROS2D.ArrowShape = function(options) {
2223 var strokeColor = options . strokeColor || createjs . Graphics . getRGB ( 0 , 0 , 0 ) ;
2324 var fillColor = options . fillColor || createjs . Graphics . getRGB ( 255 , 0 , 0 ) ;
2425 var pulse = options . pulse ;
25-
26+
2627 // draw the arrow
2728 var graphics = new createjs . Graphics ( ) ;
28-
29+
2930 var headLen = size / 3.0 ;
3031 var headWidth = headLen * 2.0 / 3.0 ;
31-
32+
3233 graphics . setStrokeStyle ( strokeSize ) ;
3334 graphics . beginStroke ( strokeColor ) ;
3435 graphics . moveTo ( 0 , 0 ) ;
3536 graphics . lineTo ( size - headLen , 0 ) ;
36-
37+
3738 graphics . beginFill ( fillColor ) ;
3839 graphics . moveTo ( size , 0 ) ;
3940 graphics . lineTo ( size - headLen , headWidth / 2.0 ) ;
4041 graphics . lineTo ( size - headLen , - headWidth / 2.0 ) ;
4142 graphics . closePath ( ) ;
4243 graphics . endFill ( ) ;
4344 graphics . endStroke ( ) ;
44-
45+
4546 // create the shape
4647 createjs . Shape . call ( this , graphics ) ;
47-
48+
4849 // check if we are pulsing
4950 if ( pulse ) {
5051 // have the model "pulse"
0 commit comments