Skip to content

Commit e9d35c4

Browse files
Fix Docs (#89)
* Add fileoverview tags * Add library revision docstring * (jsdoc) add markdown parser for option structures * Convert first markdown option structure to correct jsdoc docs
1 parent 546b4bc commit e9d35c4

18 files changed

+79
-53
lines changed

Gruntfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ module.exports = function(grunt) {
7070
'./src/**/*.js'
7171
],
7272
options: {
73-
destination: './doc'
73+
destination: './doc',
74+
configure: 'jsdoc_conf.json'
7475
}
7576
}
7677
}

jsdoc_conf.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": [ "plugins/markdown" ],
3+
"markdown": {
4+
"parser": "gfm"
5+
}
6+
}

src/Ros2D.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/**
2+
* @fileOverview
23
* @author Russell Toris - [email protected]
34
*/
45

56
var ROS2D = ROS2D || {
7+
/**
8+
* @description Library version
9+
*/
610
REVISION : '0.9.0'
711
};
812

src/maps/ImageMap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @fileOverview
23
* @author Russell Toris - [email protected]
34
*/
45

src/maps/ImageMapClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @fileOverview
23
* @author Russell Toris - [email protected]
34
*/
45

src/maps/OccupancyGrid.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @fileOverview
23
* @author Russell Toris - [email protected]
34
*/
45

@@ -63,7 +64,7 @@ ROS2D.OccupancyGrid = function(options) {
6364
createjs.Bitmap.call(this, canvas);
6465
// change Y direction
6566
this.y = -this.height * message.info.resolution;
66-
67+
6768
// scale the image
6869
this.scaleX = message.info.resolution;
6970
this.scaleY = message.info.resolution;

src/maps/OccupancyGridClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @fileOverview
23
* @author Russell Toris - [email protected]
34
*/
45

src/maps/OccupancyGridSrvClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @fileOverview
23
* @author Jihoon Lee- [email protected]
34
* @author Russell Toris - [email protected]
45
*/

src/models/ArrowShape.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @fileOverview
23
* @author Bart van Vliet - [email protected]
34
*/
45

@@ -7,12 +8,12 @@
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
*/
1718
ROS2D.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"

src/models/Grid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @fileOverview
23
* @author Raffaello Bonghi - [email protected]
34
*/
45

0 commit comments

Comments
 (0)