Add and export View2D.calculateExtent
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
@exportClass ol.View2D ol.View2DOptions
|
@exportClass ol.View2D ol.View2DOptions
|
||||||
@exportProperty ol.View2D.prototype.fitExtent
|
@exportProperty ol.View2D.prototype.fitExtent
|
||||||
|
@exportProperty ol.View2D.prototype.calculateExtent
|
||||||
@exportProperty ol.View2D.prototype.getView2D
|
@exportProperty ol.View2D.prototype.getView2D
|
||||||
|
|||||||
+3
-2
@@ -1,5 +1,4 @@
|
|||||||
// FIXME getView3D has not return type
|
// FIXME getView3D has not return type
|
||||||
// FIXME remove getExtent?
|
|
||||||
|
|
||||||
goog.provide('ol.View2D');
|
goog.provide('ol.View2D');
|
||||||
goog.provide('ol.View2DProperty');
|
goog.provide('ol.View2DProperty');
|
||||||
@@ -167,10 +166,12 @@ goog.exportProperty(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calculate the extent for the given size in pixels, the current
|
||||||
|
* resolution and the current center.
|
||||||
* @param {ol.Size} size Box pixel size.
|
* @param {ol.Size} size Box pixel size.
|
||||||
* @return {ol.Extent} Extent.
|
* @return {ol.Extent} Extent.
|
||||||
*/
|
*/
|
||||||
ol.View2D.prototype.getExtent = function(size) {
|
ol.View2D.prototype.calculateExtent = function(size) {
|
||||||
goog.asserts.assert(this.isDef());
|
goog.asserts.assert(this.isDef());
|
||||||
var center = this.getCenter();
|
var center = this.getCenter();
|
||||||
var resolution = this.getResolution();
|
var resolution = this.getResolution();
|
||||||
|
|||||||
Reference in New Issue
Block a user