Adding unreferenced bounds.

This commit is contained in:
Tim Schaub
2012-06-20 00:11:06 +02:00
parent 450f8f7b74
commit b06a52888f
5 changed files with 165 additions and 79 deletions
+23 -61
View File
@@ -1,9 +1,7 @@
goog.provide('ol.Bounds');
goog.require('ol.UnreferencedBounds');
goog.require('ol.Projection');
/**
* @constructor
* @param {number} minX Minimum X.
@@ -11,6 +9,7 @@ goog.require('ol.Projection');
* @param {number} maxX Maximum X.
* @param {number} maxY Maximum Y.
* @param {ol.Projection=} opt_projection Projection.
* @extends {ol.UnreferencedBounds}
*/
ol.Bounds = function(minX, minY, maxX, maxY, opt_projection) {
@@ -45,40 +44,44 @@ ol.Bounds = function(minX, minY, maxX, maxY, opt_projection) {
this.projection_ = opt_projection;
};
goog.inherits(ol.Bounds, ol.UnreferencedBounds);
/**
* @return {number} Minimun X.
* @param {number} minX Minimum X.
* @return {!ol.Bounds} This.
*/
ol.Bounds.prototype.getMinX = function() {
return this.minX_;
ol.Bounds.prototype.setMinX = function(minX) {
this.minX_ = minX;
return this;
};
/**
* @return {number} Minimun Y.
* @param {number} maxX Maximum X.
* @return {!ol.Bounds} This.
*/
ol.Bounds.prototype.getMinY = function() {
return this.minY_;
ol.Bounds.prototype.setMaxX = function(maxX) {
this.maxX_ = maxX;
return this;
};
/**
* @return {number} Maximun X.
* @param {number} minY Minimum Y.
* @return {!ol.Bounds} This.
*/
ol.Bounds.prototype.getMaxX = function() {
return this.maxX_;
ol.Bounds.prototype.setMinY = function(minY) {
this.minY_ = minY;
return this;
};
/**
* @return {number} Maximun Y.
* @param {number} maxY Maximum Y.
* @return {!ol.Bounds} This.
*/
ol.Bounds.prototype.getMaxY = function() {
return this.maxY_;
ol.Bounds.prototype.setMaxY = function(maxY) {
this.maxY_ = maxY;
return this;
};
/**
* @return {ol.Projection|undefined} Projection.
*/
@@ -86,47 +89,6 @@ ol.Bounds.prototype.getProjection = function() {
return this.projection_;
};
/**
* @param {number} minX Minimum X.
* @return {ol.Bounds} This.
*/
ol.Bounds.prototype.setMinX = function(minX) {
this.minX_ = minX;
return this;
};
/**
* @param {number} minY Minimum Y.
* @return {ol.Bounds} This.
*/
ol.Bounds.prototype.setMinY = function(minY) {
this.minY_ = minY;
return this;
};
/**
* @param {number} maxX Maximum X.
* @return {ol.Bounds} This.
*/
ol.Bounds.prototype.setMaxX = function(maxX) {
this.maxX_ = maxX;
return this;
};
/**
* @param {number} maxY Maximum Y.
* @return {ol.Bounds} This.
*/
ol.Bounds.prototype.setMaxY = function(maxY) {
this.maxY_ = maxY;
return this;
};
/**
* @param {ol.Projection|undefined} projection Projection.
* @return {ol.Bounds} This.