Use @observable annotation instead of @todo observable

This commit is contained in:
Tim Schaub
2014-07-05 15:51:13 -04:00
parent fd659d63e9
commit d99a61545c
20 changed files with 82 additions and 97 deletions

View File

@@ -23,7 +23,6 @@
"apidoc/plugins/inheritdoc",
"apidoc/plugins/interface",
"apidoc/plugins/typedefs",
"apidoc/plugins/todo",
"apidoc/plugins/events",
"apidoc/plugins/observable",
"apidoc/plugins/api"

View File

@@ -1,14 +0,0 @@
var util = require('util');
exports.defineTags = function(dictionary) {
dictionary.defineTag('todo', {
mustHaveValue: true,
canHaveType: true,
canHaveName: true,
onTagged: function(doclet, tag) {
var parts = tag.text.split(' ');
if (parts[0] === 'observable') {
doclet.observable = '';
}
}
});
};

View File

@@ -359,7 +359,7 @@ virtual('lint', 'build/lint-timestamp', 'build/check-requires-timestamp',
def build_lint_src_timestamp(t):
t.run('%(GJSLINT)s',
'--jslint_error=all',
'--custom_jsdoc_tags=event,fires,todo,function,classdesc,api',
'--custom_jsdoc_tags=event,fires,function,classdesc,api,observable',
'--strict',
t.newer(t.dependencies))
t.touch()

View File

@@ -56,7 +56,7 @@
"visibility"
],
"extra_annotation_name": [
"api"
"api", "observable"
],
"jscomp_off": [
"es5Strict"

View File

@@ -53,7 +53,7 @@
"visibility"
],
"extra_annotation_name": [
"api"
"api", "observable"
],
"jscomp_off": [
"es5Strict"

View File

@@ -53,7 +53,7 @@
"visibility"
],
"extra_annotation_name": [
"api"
"api", "observable"
],
"jscomp_off": [
"es5Strict"

View File

@@ -53,7 +53,7 @@
"visibility"
],
"extra_annotation_name": [
"api"
"api", "observable"
],
"jscomp_off": [
"es5Strict"

View File

@@ -53,7 +53,7 @@
"visibility"
],
"extra_annotation_name": [
"api"
"api", "observable"
],
"jscomp_off": [
"es5Strict"

View File

@@ -159,7 +159,7 @@ ol.Collection.prototype.item = function(index) {
/**
* Get the length of this collection.
* @return {number} The length of the array.
* @todo observable
* @observable
* @api stable
*/
ol.Collection.prototype.getLength = function() {

View File

@@ -129,7 +129,7 @@ ol.control.MousePosition.prototype.handleProjectionChanged_ = function() {
/**
* @return {ol.CoordinateFormatType|undefined} The format to render the current
* position in.
* @todo observable
* @observable
* @api
*/
ol.control.MousePosition.prototype.getCoordinateFormat = function() {
@@ -145,7 +145,7 @@ goog.exportProperty(
/**
* @return {ol.proj.Projection|undefined} The projection to report mouse
* position in.
* @todo observable
* @observable
* @api
*/
ol.control.MousePosition.prototype.getProjection = function() {
@@ -202,7 +202,7 @@ ol.control.MousePosition.prototype.setMap = function(map) {
/**
* @param {ol.CoordinateFormatType} format The format to render the current
* position in.
* @todo observable
* @observable
* @api
*/
ol.control.MousePosition.prototype.setCoordinateFormat = function(format) {
@@ -217,7 +217,7 @@ goog.exportProperty(
/**
* @param {ol.proj.Projection} projection The projection to report mouse
* position in.
* @todo observable
* @observable
* @api
*/
ol.control.MousePosition.prototype.setProjection = function(projection) {

View File

@@ -137,7 +137,7 @@ ol.control.ScaleLine.LEADING_DIGITS = [1, 2, 5];
/**
* @return {ol.control.ScaleLineUnits|undefined} The units to use in the scale
* line.
* @todo observable
* @observable
* @api
*/
ol.control.ScaleLine.prototype.getUnits = function() {
@@ -174,7 +174,7 @@ ol.control.ScaleLine.prototype.handleUnitsChanged_ = function() {
/**
* @param {ol.control.ScaleLineUnits} units The units to use in the scale line.
* @todo observable
* @observable
* @api
*/
ol.control.ScaleLine.prototype.setUnits = function(units) {

View File

@@ -139,7 +139,7 @@ ol.DeviceOrientation.prototype.orientationChange_ = function(browserEvent) {
/**
* @return {number|undefined} The euler angle in radians of the device from the
* standard Z axis.
* @todo observable
* @observable
* @api
*/
ol.DeviceOrientation.prototype.getAlpha = function() {
@@ -155,7 +155,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The euler angle in radians of the device from the
* planar X axis.
* @todo observable
* @observable
* @api
*/
ol.DeviceOrientation.prototype.getBeta = function() {
@@ -171,7 +171,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The euler angle in radians of the device from the
* planar Y axis.
* @todo observable
* @observable
* @api
*/
ol.DeviceOrientation.prototype.getGamma = function() {
@@ -187,7 +187,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The heading of the device relative to north, in
* radians, normalizing for different browser behavior.
* @todo observable
* @observable
* @api
*/
ol.DeviceOrientation.prototype.getHeading = function() {
@@ -204,7 +204,7 @@ goog.exportProperty(
* Are we tracking the device's orientation?
* @return {boolean} The status of tracking changes to alpha, beta and gamma.
* If true, changes are tracked and reported immediately.
* @todo observable
* @observable
* @api
*/
ol.DeviceOrientation.prototype.getTracking = function() {
@@ -238,7 +238,7 @@ ol.DeviceOrientation.prototype.handleTrackingChanged_ = function() {
* Enable or disable tracking of DeviceOrientation events.
* @param {boolean} tracking The status of tracking changes to alpha, beta and
* gamma. If true, changes are tracked and reported immediately.
* @todo observable
* @observable
* @api
*/
ol.DeviceOrientation.prototype.setTracking = function(tracking) {

View File

@@ -58,7 +58,7 @@ goog.inherits(ol.dom.Input, ol.Object);
/**
* If the input is a checkbox, return whether or not the checkbox is checked.
* @return {boolean|undefined} The checked state of the Input.
* @todo observable
* @observable
* @api
*/
ol.dom.Input.prototype.getChecked = function() {
@@ -73,7 +73,7 @@ goog.exportProperty(
/**
* Get the value of the input.
* @return {string|undefined} The value of the Input.
* @todo observable
* @observable
* @api
*/
ol.dom.Input.prototype.getValue = function() {
@@ -88,7 +88,7 @@ goog.exportProperty(
/**
* Sets the value of the input.
* @param {string} value The value of the Input.
* @todo observable
* @observable
* @api
*/
ol.dom.Input.prototype.setValue = function(value) {
@@ -103,7 +103,7 @@ goog.exportProperty(
/**
* Set whether or not a checkbox is checked.
* @param {boolean} checked The checked state of the Input.
* @todo observable
* @observable
* @api
*/
ol.dom.Input.prototype.setChecked = function(checked) {

View File

@@ -191,7 +191,7 @@ ol.Geolocation.prototype.positionError_ = function(error) {
* Get the accuracy of the position in meters.
* @return {number|undefined} The accuracy of the position measurement in
* meters.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getAccuracy = function() {
@@ -207,7 +207,7 @@ goog.exportProperty(
/**
* Get a geometry of the position accuracy.
* @return {?ol.geom.Geometry} A geometry of the position accuracy.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getAccuracyGeometry = function() {
@@ -224,7 +224,7 @@ goog.exportProperty(
* Get the altitude associated with the position.
* @return {number|undefined} The altitude of the position in meters above mean
* sea level.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getAltitude = function() {
@@ -241,7 +241,7 @@ goog.exportProperty(
* Get the altitude accuracy of the position.
* @return {number|undefined} The accuracy of the altitude measurement in
* meters.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getAltitudeAccuracy = function() {
@@ -257,7 +257,7 @@ goog.exportProperty(
/**
* Get the heading as radians clockwise from North.
* @return {number|undefined} The heading of the device in radians from north.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getHeading = function() {
@@ -274,7 +274,7 @@ goog.exportProperty(
* Get the position of the device.
* @return {ol.Coordinate|undefined} The current position of the device reported
* in the current projection.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getPosition = function() {
@@ -291,7 +291,7 @@ goog.exportProperty(
* Get the projection associated with the position.
* @return {ol.proj.Projection|undefined} The projection the position is
* reported in.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getProjection = function() {
@@ -308,7 +308,7 @@ goog.exportProperty(
* Get the speed in meters per second.
* @return {number|undefined} The instantaneous speed of the device in meters
* per second.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getSpeed = function() {
@@ -324,7 +324,7 @@ goog.exportProperty(
/**
* Are we tracking the user's position?
* @return {boolean} Whether to track the device's position.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getTracking = function() {
@@ -343,7 +343,7 @@ goog.exportProperty(
* @return {GeolocationPositionOptions|undefined} PositionOptions as defined by
* the HTML5 Geolocation spec at
* {@link http://www.w3.org/TR/geolocation-API/#position_options_interface}
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.getTrackingOptions = function() {
@@ -360,7 +360,7 @@ goog.exportProperty(
* Set the projection to use for transforming the coordinates.
* @param {ol.proj.Projection} projection The projection the position is
* reported in.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.setProjection = function(projection) {
@@ -375,7 +375,7 @@ goog.exportProperty(
/**
* Enable/disable tracking.
* @param {boolean} tracking Whether to track the device's position.
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.setTracking = function(tracking) {
@@ -393,7 +393,7 @@ goog.exportProperty(
* @param {GeolocationPositionOptions} options PositionOptions as defined by the
* HTML5 Geolocation spec at
* {@link http://www.w3.org/TR/geolocation-API/#position_options_interface}
* @todo observable
* @observable
* @api
*/
ol.Geolocation.prototype.setTrackingOptions = function(options) {

View File

@@ -85,7 +85,7 @@ goog.inherits(ol.layer.Base, ol.Object);
/**
* @return {number|undefined} The brightness of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getBrightness = function() {
@@ -100,7 +100,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The contrast of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getContrast = function() {
@@ -115,7 +115,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The hue of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getHue = function() {
@@ -173,7 +173,7 @@ ol.layer.Base.prototype.getLayerStatesArray = goog.abstractMethod;
/**
* @return {number|undefined} The maximum resolution of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getMaxResolution = function() {
@@ -188,7 +188,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The minimum resolution of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getMinResolution = function() {
@@ -203,7 +203,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The opacity of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getOpacity = function() {
@@ -218,7 +218,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The saturation of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getSaturation = function() {
@@ -239,7 +239,7 @@ ol.layer.Base.prototype.getSourceState = goog.abstractMethod;
/**
* @return {boolean|undefined} The visiblity of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.getVisible = function() {
@@ -271,7 +271,7 @@ goog.exportProperty(
* [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647
*
* @param {number|undefined} brightness The brightness of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setBrightness = function(brightness) {
@@ -289,7 +289,7 @@ goog.exportProperty(
* linear multipliers on the effect (and values over 1 are permitted).
*
* @param {number|undefined} contrast The contrast of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setContrast = function(contrast) {
@@ -305,7 +305,7 @@ goog.exportProperty(
* Apply a hue-rotation to the layer. A value of 0 will leave the hue
* unchanged. Other values are radians around the color circle.
* @param {number|undefined} hue The hue of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setHue = function(hue) {
@@ -319,7 +319,7 @@ goog.exportProperty(
/**
* @param {number|undefined} maxResolution The maximum resolution of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setMaxResolution = function(maxResolution) {
@@ -333,7 +333,7 @@ goog.exportProperty(
/**
* @param {number|undefined} minResolution The minimum resolution of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setMinResolution = function(minResolution) {
@@ -347,7 +347,7 @@ goog.exportProperty(
/**
* @param {number|undefined} opacity The opacity of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setOpacity = function(opacity) {
@@ -366,7 +366,7 @@ goog.exportProperty(
* permitted).
*
* @param {number|undefined} saturation The saturation of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setSaturation = function(saturation) {
@@ -380,7 +380,7 @@ goog.exportProperty(
/**
* @param {boolean|undefined} visible The visiblity of the layer.
* @todo observable
* @observable
* @api
*/
ol.layer.Base.prototype.setVisible = function(visible) {

View File

@@ -147,7 +147,7 @@ ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) {
/**
* @return {ol.Collection|undefined} Collection of {@link ol.layer.Layer layers}
* that are part of this group.
* @todo observable
* @observable
*/
ol.layer.Group.prototype.getLayers = function() {
return /** @type {ol.Collection|undefined} */ (this.get(
@@ -162,7 +162,7 @@ goog.exportProperty(
/**
* @param {ol.Collection|undefined} layers Collection of
* {@link ol.layer.Layer layers} that are part of this group.
* @todo observable
* @observable
*/
ol.layer.Group.prototype.setLayers = function(layers) {
this.set(ol.layer.GroupProperty.LAYERS, layers);

View File

@@ -33,7 +33,7 @@ goog.inherits(ol.layer.Tile, ol.layer.Layer);
/**
* @return {number|undefined} The level to preload tiles up to.
* @todo observable
* @observable
*/
ol.layer.Tile.prototype.getPreload = function() {
return /** @type {number|undefined} */ (
@@ -47,7 +47,7 @@ goog.exportProperty(
/**
* @param {number} preload The level to preload tiles up to.
* @todo observable
* @observable
*/
ol.layer.Tile.prototype.setPreload = function(preload) {
this.set(ol.layer.TileProperty.PRELOAD, preload);

View File

@@ -612,7 +612,7 @@ ol.Map.prototype.getEventPixel = function(event) {
* if that was an element, it returns an element; if a string, it returns that.
* @return {Element|string|undefined} The Element or id of the Element that the
* map is rendered in.
* @todo observable
* @observable
* @api stable
*/
ol.Map.prototype.getTarget = function() {
@@ -676,7 +676,7 @@ ol.Map.prototype.getInteractions = function() {
/**
* Get the layergroup associated with this map.
* @return {ol.layer.Group} A layer group containing the layers in this map.
* @todo observable
* @observable
* @api stable
*/
ol.Map.prototype.getLayerGroup = function() {
@@ -732,7 +732,7 @@ ol.Map.prototype.getRenderer = function() {
/**
* Get the size of this map.
* @return {ol.Size|undefined} The size in pixels of the map in the DOM.
* @todo observable
* @observable
* @api stable
*/
ol.Map.prototype.getSize = function() {
@@ -748,7 +748,7 @@ goog.exportProperty(
* Get the view associated with this map. A view manages properties such as
* center and resolution.
* @return {ol.View|undefined} The view that controls this map.
* @todo observable
* @observable
* @api stable
*/
ol.Map.prototype.getView = function() {
@@ -1269,7 +1269,7 @@ ol.Map.prototype.renderFrame_ = function(time) {
* Sets the layergroup of this map.
* @param {ol.layer.Group} layerGroup A layer group containing the layers in
* this map.
* @todo observable
* @observable
* @api stable
*/
ol.Map.prototype.setLayerGroup = function(layerGroup) {
@@ -1284,7 +1284,7 @@ goog.exportProperty(
/**
* Set the size of this map.
* @param {ol.Size|undefined} size The size in pixels of the map in the DOM.
* @todo observable
* @observable
* @api
*/
ol.Map.prototype.setSize = function(size) {
@@ -1300,7 +1300,7 @@ goog.exportProperty(
* Set the target element to render this map into.
* @param {Element|string|undefined} target The Element or id of the Element
* that the map is rendered in.
* @todo observable
* @observable
* @api stable
*/
ol.Map.prototype.setTarget = function(target) {
@@ -1315,7 +1315,7 @@ goog.exportProperty(
/**
* Set the view for this map.
* @param {ol.View} view The view that controls this map.
* @todo observable
* @observable
* @api stable
*/
ol.Map.prototype.setView = function(view) {

View File

@@ -154,7 +154,7 @@ goog.inherits(ol.Overlay, ol.Object);
/**
* Get the DOM element of this overlay.
* @return {Element|undefined} The Element containing the overlay.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.getElement = function() {
@@ -170,7 +170,7 @@ goog.exportProperty(
/**
* Get the map associated with this overlay.
* @return {ol.Map|undefined} The map that the overlay is part of.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.getMap = function() {
@@ -186,7 +186,7 @@ goog.exportProperty(
/**
* Get the offset of this overlay.
* @return {Array.<number>} The offset.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.getOffset = function() {
@@ -203,7 +203,7 @@ goog.exportProperty(
* Get the current position of this overlay.
* @return {ol.Coordinate|undefined} The spatial point that the overlay is
* anchored at.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.getPosition = function() {
@@ -220,7 +220,7 @@ goog.exportProperty(
* Get the current positioning of this overlay.
* @return {ol.OverlayPositioning} How the overlay is positioned
* relative to its point on the map.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.getPositioning = function() {
@@ -306,7 +306,7 @@ ol.Overlay.prototype.handlePositioningChanged = function() {
/**
* Set the DOM element to be associated with this overlay.
* @param {Element|undefined} element The Element containing the overlay.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.setElement = function(element) {
@@ -321,7 +321,7 @@ goog.exportProperty(
/**
* Set the map to be associated with this overlay.
* @param {ol.Map|undefined} map The map that the overlay is part of.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.setMap = function(map) {
@@ -336,7 +336,7 @@ goog.exportProperty(
/**
* Set the offset for this overlay.
* @param {Array.<number>} offset Offset.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.setOffset = function(offset) {
@@ -352,7 +352,7 @@ goog.exportProperty(
* Set the position for this overlay.
* @param {ol.Coordinate|undefined} position The spatial point that the overlay
* is anchored at.
* @todo observable
* @observable
* @api stable
*/
ol.Overlay.prototype.setPosition = function(position) {
@@ -368,7 +368,7 @@ goog.exportProperty(
* Set the positioning for this overlay.
* @param {ol.OverlayPositioning} positioning how the overlay is
* positioned relative to its point on the map.
* @todo observable
* @observable
* @api
*/
ol.Overlay.prototype.setPositioning = function(positioning) {

View File

@@ -234,7 +234,7 @@ ol.View.prototype.constrainRotation = function(rotation, opt_delta) {
/**
* @return {ol.Coordinate|undefined} The center of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.getCenter = function() {
@@ -276,7 +276,7 @@ ol.View.prototype.calculateExtent = function(size) {
/**
* @return {ol.proj.Projection|undefined} The projection of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.getProjection = function() {
@@ -291,7 +291,7 @@ goog.exportProperty(
/**
* @return {number|undefined} The resolution of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.getResolution = function() {
@@ -346,7 +346,7 @@ ol.View.prototype.getResolutionForValueFunction = function(opt_power) {
/**
* @return {number|undefined} The rotation of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.getRotation = function() {
@@ -569,7 +569,7 @@ ol.View.prototype.rotate = function(rotation, opt_anchor) {
/**
* Set the center of the current view.
* @param {ol.Coordinate|undefined} center The center of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.setCenter = function(center) {
@@ -598,7 +598,7 @@ ol.View.prototype.setHint = function(hint, delta) {
* Set the projection of this view.
* Warning! This code is not yet implemented. Function should not be used.
* @param {ol.proj.Projection|undefined} projection The projection of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.setProjection = function(projection) {
@@ -613,7 +613,7 @@ goog.exportProperty(
/**
* Set the resolution for this view.
* @param {number|undefined} resolution The resolution of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.setResolution = function(resolution) {
@@ -628,7 +628,7 @@ goog.exportProperty(
/**
* Set the rotation for this view.
* @param {number|undefined} rotation The rotation of the view.
* @todo observable
* @observable
* @api
*/
ol.View.prototype.setRotation = function(rotation) {