From afb37035dc3d77945e29493914057e8d841c4fe1 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 5 Jul 2012 16:02:47 +0200 Subject: [PATCH] Add ol.Extent --- src/all.js | 1 + src/ol/extent.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/ol/extent.js diff --git a/src/all.js b/src/all.js index 8cd23bd5b1..cd16a8ce30 100644 --- a/src/all.js +++ b/src/all.js @@ -2,6 +2,7 @@ goog.provide('ol'); goog.require('ol.Bounds'); goog.require('ol.Camera'); +goog.require('ol.Extent'); goog.require('ol.MVCArray'); goog.require('ol.MVCObject'); goog.require('ol.TileBounds'); diff --git a/src/ol/extent.js b/src/ol/extent.js new file mode 100644 index 0000000000..58e2f764f3 --- /dev/null +++ b/src/ol/extent.js @@ -0,0 +1,28 @@ +goog.provide('ol.Extent'); + +goog.require('goog.math.Box'); + + + +/** + * @constructor + * @extends {goog.math.Box} + * @param {number} top Top. + * @param {number} right Right. + * @param {number} bottom Bottom. + * @param {number} left Left. + */ +ol.Extent = function(top, right, bottom, left) { + + goog.base(this, top, right, bottom, left); + +}; +goog.inherits(ol.Extent, goog.math.Box); + + +/** + * @return {ol.Extent} Extent. + */ +ol.Extent.prototype.clone = function() { + return new ol.Extent(this.top, this.right, this.bottom, this.left); +};