Add assert messages for all assertions up until ol.renderer.vector.
This commit is contained in:
@@ -35,7 +35,8 @@ goog.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry);
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.appendPoint = function(point) {
|
||||
goog.asserts.assert(point.getLayout() == this.layout);
|
||||
goog.asserts.assert(point.getLayout() == this.layout,
|
||||
'the layout of point should match layout');
|
||||
if (goog.isNull(this.flatCoordinates)) {
|
||||
this.flatCoordinates = point.getFlatCoordinates().slice();
|
||||
} else {
|
||||
@@ -102,7 +103,8 @@ ol.geom.MultiPoint.prototype.getCoordinates = function() {
|
||||
ol.geom.MultiPoint.prototype.getPoint = function(index) {
|
||||
var n = goog.isNull(this.flatCoordinates) ?
|
||||
0 : this.flatCoordinates.length / this.stride;
|
||||
goog.asserts.assert(0 <= index && index < n);
|
||||
goog.asserts.assert(0 <= index && index < n,
|
||||
'index should be in between 0 and n');
|
||||
if (index < 0 || n <= index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user