Simplify the way we annotate observable properties

We no longer add observable annotations to the constructor.
Instead, we just mark getters (and for read/write properties
also setters) with an observable annotation.
This commit is contained in:
Andreas Hocevar
2014-05-03 16:04:25 -04:00
parent 0f072c0ec1
commit 8ee9f7cb6a
18 changed files with 246 additions and 186 deletions

View File

@@ -59,12 +59,6 @@ ol.OverlayPositioning = {
* @constructor
* @extends {ol.Object}
* @param {olx.OverlayOptions} options Overlay options.
* @todo observable element {Element} the Element containing the overlay
* @todo observable map {ol.Map} the map that the overlay is part of
* @todo observable position {ol.Coordinate} the spatial point that the overlay
* is anchored at
* @todo observable positioning {ol.OverlayPositioning} how the overlay is
* positioned relative to its point on the map
* @todo api stable
*/
ol.Overlay = function(options) {
@@ -159,7 +153,8 @@ goog.inherits(ol.Overlay, ol.Object);
/**
* Get the DOM element of this overlay.
* @return {Element|undefined} Element.
* @return {Element|undefined} The Element containing the overlay.
* @todo observable
* @todo api
*/
ol.Overlay.prototype.getElement = function() {
@@ -174,7 +169,8 @@ goog.exportProperty(
/**
* Get the map associated with this overlay.
* @return {ol.Map|undefined} Map.
* @return {ol.Map|undefined} The map that the overlay is part of.
* @todo observable
* @todo api
*/
ol.Overlay.prototype.getMap = function() {
@@ -189,7 +185,9 @@ goog.exportProperty(
/**
* Get the current position of this overlay.
* @return {ol.Coordinate|undefined} Position.
* @return {ol.Coordinate|undefined} The spatial point that the overlay is
* anchored at.
* @todo observable
* @todo api
*/
ol.Overlay.prototype.getPosition = function() {
@@ -204,7 +202,9 @@ goog.exportProperty(
/**
* Get the current positioning of this overlay.
* @return {ol.OverlayPositioning|undefined} Positioning.
* @return {ol.OverlayPositioning|undefined} How the overlay is positioned
* relative to its point on the map.
* @todo observable
* @todo api
*/
ol.Overlay.prototype.getPositioning = function() {
@@ -281,7 +281,8 @@ ol.Overlay.prototype.handlePositioningChanged = function() {
/**
* Set the DOM element to be associated with this overlay.
* @param {Element|undefined} element Element.
* @param {Element|undefined} element The Element containing the overlay.
* @todo observable
* @todo api
*/
ol.Overlay.prototype.setElement = function(element) {
@@ -295,7 +296,8 @@ goog.exportProperty(
/**
* Set the map to be associated with this overlay.
* @param {ol.Map|undefined} map Map.
* @param {ol.Map|undefined} map The map that the overlay is part of.
* @todo observable
* @todo api
*/
ol.Overlay.prototype.setMap = function(map) {
@@ -309,7 +311,9 @@ goog.exportProperty(
/**
* Set the position for this overlay.
* @param {ol.Coordinate|undefined} position Position.
* @param {ol.Coordinate|undefined} position The spatial point that the overlay
* is anchored at.
* @todo observable
* @todo api stable
*/
ol.Overlay.prototype.setPosition = function(position) {
@@ -323,7 +327,9 @@ goog.exportProperty(
/**
* Set the positioning for this overlay.
* @param {ol.OverlayPositioning|undefined} positioning Positioning.
* @param {ol.OverlayPositioning|undefined} positioning how the overlay is
* positioned relative to its point on the map.
* @todo observable
* @todo api
*/
ol.Overlay.prototype.setPositioning = function(positioning) {