Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve API documentation #697

Merged
merged 5 commits into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion jsdoc.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"opts": {
"template": "node_modules/jaguarjs-jsdoc"
},
"plugins": [
"node_modules/jsdoc-autoprivate/autoprivate.js",
"plugins/markdown"
],
"templates": {
"applicationName": "GeoJS",
"linenums": true,
"cleverLinks": true,
"default": {
"useLongnameInNav": true
"outputSourceFiles": true
}
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@
"istanbul-instrumenter-loader": "^0.2.0",
"jade": "^1.11.0",
"jade-loader": "^0.8.0",
"jaguarjs-jsdoc": "^1.0.2",
"jasmine-core": "^2.4.1",
"jquery": "~2.2.1",
"jsdoc": "^3.4",
"jsdoc-autoprivate": "0.0.1",
"json-loader": "^0.5.4",
"karma": "^0.13.22",
"karma-coverage": "^1.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
* * viewFromCenterSizeRotation: set the camera view based on a center
* point, boundary size, and rotation angle.
*
* @class geo.camera
* @class
* @alias geo.camera
* @extends geo.object
* @param {object?} spec Options argument
* @param {string} spec.projection One of the supported geo.camera.projection
Expand Down
5 changes: 4 additions & 1 deletion src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
* <br>
* The following properties are common to all event objects:
*
* @namespace geo.event
* @namespace
* @alias geo.event
* @property {string} type The event type that was triggered
* @property {object} geo A universal event object for controlling propagation
*
Expand Down Expand Up @@ -83,6 +84,8 @@ geo_event.rotate = 'geo_rotate';
* Triggered when the map is panned either by user interaction or map
* transition.
*
* @event geo.event.pan
* @type {object}
* @property {object} screenDelta The number of pixels to pan the map by
* @property {object} center The new map center
*/
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @namespace geo */
// License headers that will be preserved in distributed bundles.
/**
* GeoJS
Expand Down
7 changes: 5 additions & 2 deletions src/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var sceneObject = require('./sceneObject');
* (center.x, center.y) + o <-- center of viewport
* (-c, -c) + o (c, -c) + o
*
* @class geo.map
* @class
* @alias geo.map
* @extends geo.sceneObject
*
* *** Always required ***
Expand Down Expand Up @@ -418,6 +419,7 @@ var map = function (arg) {
* clampBoundsX options (up to a point, see fix_bounds) when determining
* the new view.
* @returns {geo.map}
* @fires geo.event.event:pan
*/
////////////////////////////////////////////////////////////////////////////
this.pan = function (delta, ignoreDiscreteZoom, ignoreClampBounds) {
Expand Down Expand Up @@ -1504,7 +1506,8 @@ var map = function (arg) {
////////////////////////////////////////////////////////////////////////////
/**
* Get the layers contained in the map.
* Alias of {@linkcode geo.sceneObject.children}.
* Alias of {@linkcode geo.sceneObject#children}.
* @method
*/
////////////////////////////////////////////////////////////////////////////
this.layers = this.children;
Expand Down
3 changes: 2 additions & 1 deletion src/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ var inherit = require('./inherit');
/**
* Create a new instance of class object
*
* @class geo.object
* @class
* @alias geo.object
* @extends vgl.object
* @returns {geo.object}
*/
Expand Down
5 changes: 3 additions & 2 deletions src/sceneObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ var object = require('./object');
* Create a new instance of class sceneObject, which extends the object's
* event handling with a tree-based event propagation.
*
* @class geo.sceneObject
* @class
* @alias geo.sceneObject
* @extends geo.object
* @returns {geo.sceneObject}
*/
Expand Down Expand Up @@ -55,7 +56,7 @@ var sceneObject = function (arg) {
//////////////////////////////////////////////////////////////////////////////
/**
* Get/set parent of the object
* @param {?geo.sceneObject} parent
* @param {geo.sceneObject} [parent]
*/
//////////////////////////////////////////////////////////////////////////////
this.parent = function (arg) {
Expand Down
Loading