Define getCoordinates and setCoordinates in the base class

Since these methods are implemented by all subclasses, it makes sense to
define them in the base class as abstract method.
This commit is contained in:
Andreas Hocevar
2015-05-08 11:14:45 +02:00
parent 16c4082898
commit 4e94908440

View File

@@ -98,6 +98,12 @@ ol.geom.SimpleGeometry.prototype.computeExtent = function(extent) {
};
/**
* @return {Array} Coordinates.
*/
ol.geom.SimpleGeometry.prototype.getCoordinates = goog.abstractMethod;
/**
* Return the first coordinate of the geometry.
* @return {ol.Coordinate} First coordinate.
@@ -209,6 +215,13 @@ ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal =
};
/**
* @param {Array} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
*/
ol.geom.SimpleGeometry.prototype.setCoordinates = goog.abstractMethod;
/**
* @param {ol.geom.GeometryLayout|undefined} layout Layout.
* @param {Array} coordinates Coordinates.