Width and height on unreferenced bounds.

This commit is contained in:
Tim Schaub committed 2012-06-21 00:50:26 +02:00
1 parent 5287677489
commit be54add905
3 files changed
+35

No files matched your search

+13
View File
@@ -92,3 +92,16 @@ ol.UnreferencedBounds.prototype.setMaxY = function(maxY) {
this.maxY_ = maxY;
};
/**
* @return {number} Bounds width.
*/
ol.UnreferencedBounds.prototype.getWidth = function() {
return this.maxX_ - this.minX_;
};
/**
* @return {number} Bounds height.
*/
ol.UnreferencedBounds.prototype.getHeight = function() {
return this.maxY_ - this.minY_;
};