Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and export View2D.calculateExtent #700

Merged
merged 1 commit into from May 10, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ol/view2d.exports
@@ -1,3 +1,4 @@
@exportClass ol.View2D ol.View2DOptions
@exportProperty ol.View2D.prototype.fitExtent
@exportProperty ol.View2D.prototype.calculateExtent
@exportProperty ol.View2D.prototype.getView2D
5 changes: 3 additions & 2 deletions src/ol/view2d.js
@@ -1,5 +1,4 @@
// FIXME getView3D has not return type
// FIXME remove getExtent?

goog.provide('ol.View2D');
goog.provide('ol.View2DProperty');
Expand Down Expand Up @@ -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.
* @return {ol.Extent} Extent.
*/
ol.View2D.prototype.getExtent = function(size) {
ol.View2D.prototype.calculateExtent = function(size) {
goog.asserts.assert(this.isDef());
var center = this.getCenter();
var resolution = this.getResolution();
Expand Down