Merge pull request #682 from elemoine/export-func

missing exports
This commit is contained in:
Éric Lemoine
2013-08-19 09:14:16 -07:00
24 changed files with 134 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
@exportSymbol ol.animation.bounce
@exportSymbol ol.animation.pan
@exportSymbol ol.animation.rotate
@exportSymbol ol.animation.zoom
@exportFunction ol.animation.bounce ol.animation.BounceOptions ol.PreRenderFunction
@exportFunction ol.animation.pan ol.animation.PanOptions ol.PreRenderFunction
@exportFunction ol.animation.rotate ol.animation.RotateOptions ol.PreRenderFunction
@exportFunction ol.animation.zoom ol.animation.ZoomOptions ol.PreRenderFunction

View File

@@ -1,6 +1,9 @@
// FIXME works for View2D only
goog.provide('ol.animation');
goog.provide('ol.animation.bounce');
goog.provide('ol.animation.pan');
goog.provide('ol.animation.rotate');
goog.provide('ol.animation.zoom');
goog.require('ol.PreRenderFunction');
goog.require('ol.ViewHint');

View File

@@ -1,5 +1,6 @@
@exportSymbol ol.Collection
@exportProperty ol.Collection.prototype.clear
@exportProperty ol.Collection.prototype.extend
@exportProperty ol.Collection.prototype.forEach
@exportProperty ol.Collection.prototype.getAt
@exportProperty ol.Collection.prototype.getLength

View File

@@ -86,12 +86,14 @@ ol.Collection.prototype.clear = function() {
/**
* @param {Array} arr Array.
* @return {ol.Collection} This collection.
*/
ol.Collection.prototype.extend = function(arr) {
var i, ii;
for (i = 0, ii = arr.length; i < ii; ++i) {
this.push(arr[i]);
}
return this;
};

View File

@@ -1 +1 @@
@exportSymbol ol.control.defaults ol.control.defaults
@exportFunction ol.control.defaults ol.control.DefaultsOptions ol.Collection

View File

@@ -8,10 +8,9 @@ goog.require('ol.control.Zoom');
/**
* @param {ol.control.DefaultsOptions=} opt_options Defaults options.
* @param {Array.<ol.control.Control>=} opt_controls Additional controls.
* @return {ol.Collection} Controls.
*/
ol.control.defaults = function(opt_options, opt_controls) {
ol.control.defaults = function(opt_options) {
var options = goog.isDef(opt_options) ? opt_options : {};
@@ -36,15 +35,11 @@ ol.control.defaults = function(opt_options, opt_controls) {
var zoomControl = goog.isDef(options.zoom) ?
options.zoom : true;
if (zoomControl) {
var zoomControlOptions = goog.isDef(options.zoomControlOptions) ?
options.zoomControlOptions : undefined;
var zoomControlOptions = goog.isDef(options.zoomOptions) ?
options.zoomOptions : undefined;
controls.push(new ol.control.Zoom(zoomControlOptions));
}
if (goog.isDef(opt_controls)) {
controls.extend(opt_controls);
}
return controls;
};

View File

@@ -6,7 +6,7 @@ goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('ol.animation');
goog.require('ol.animation.zoom');
goog.require('ol.control.Control');
goog.require('ol.css');
goog.require('ol.easing');

View File

@@ -15,7 +15,7 @@ goog.require('goog.fx.Dragger.EventType');
goog.require('goog.math');
goog.require('goog.math.Rect');
goog.require('goog.style');
goog.require('ol.animation');
goog.require('ol.animation.zoom');
goog.require('ol.control.Control');
goog.require('ol.css');
goog.require('ol.easing');

View File

@@ -3,7 +3,9 @@
goog.provide('ol.interaction.Interaction');
goog.require('ol.MapBrowserEvent');
goog.require('ol.animation');
goog.require('ol.animation.pan');
goog.require('ol.animation.rotate');
goog.require('ol.animation.zoom');
goog.require('ol.easing');

View File

@@ -1 +1 @@
@exportSymbol ol.interaction.defaults ol.interaction.defaults
@exportFunction ol.interaction.defaults ol.interaction.DefaultsOptions ol.Collection

View File

@@ -6,7 +6,6 @@ goog.require('ol.interaction.DoubleClickZoom');
goog.require('ol.interaction.DragPan');
goog.require('ol.interaction.DragRotate');
goog.require('ol.interaction.DragZoom');
goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.KeyboardPan');
goog.require('ol.interaction.KeyboardZoom');
goog.require('ol.interaction.MouseWheelZoom');
@@ -17,11 +16,9 @@ goog.require('ol.interaction.TouchZoom');
/**
* @param {ol.interaction.DefaultsOptions=} opt_options Defaults options.
* @param {Array.<ol.interaction.Interaction>=} opt_interactions Additional
* interactions.
* @return {ol.Collection} Interactions.
*/
ol.interaction.defaults = function(opt_options, opt_interactions) {
ol.interaction.defaults = function(opt_options) {
var options = goog.isDef(opt_options) ? opt_options : {};
@@ -92,10 +89,6 @@ ol.interaction.defaults = function(opt_options, opt_interactions) {
interactions.push(new ol.interaction.DragZoom());
}
if (goog.isDef(opt_interactions)) {
interactions.extend(opt_interactions);
}
return interactions;
};

View File

@@ -3,7 +3,7 @@ goog.provide('ol.Kinetic');
goog.require('ol.Coordinate');
goog.require('ol.PreRenderFunction');
goog.require('ol.animation');
goog.require('ol.animation.pan');