Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions

View File

@@ -1,16 +1,18 @@
goog.provide('ol.interaction');
goog.require('ol.Collection');
goog.require('ol.Kinetic');
goog.require('ol.interaction.DoubleClickZoom');
goog.require('ol.interaction.DragPan');
goog.require('ol.interaction.DragRotate');
goog.require('ol.interaction.DragZoom');
goog.require('ol.interaction.KeyboardPan');
goog.require('ol.interaction.KeyboardZoom');
goog.require('ol.interaction.MouseWheelZoom');
goog.require('ol.interaction.PinchRotate');
goog.require('ol.interaction.PinchZoom');
/**
* @module ol/interaction
*/
import _ol_Collection_ from './Collection.js';
import _ol_Kinetic_ from './Kinetic.js';
import _ol_interaction_DoubleClickZoom_ from './interaction/DoubleClickZoom.js';
import _ol_interaction_DragPan_ from './interaction/DragPan.js';
import _ol_interaction_DragRotate_ from './interaction/DragRotate.js';
import _ol_interaction_DragZoom_ from './interaction/DragZoom.js';
import _ol_interaction_KeyboardPan_ from './interaction/KeyboardPan.js';
import _ol_interaction_KeyboardZoom_ from './interaction/KeyboardZoom.js';
import _ol_interaction_MouseWheelZoom_ from './interaction/MouseWheelZoom.js';
import _ol_interaction_PinchRotate_ from './interaction/PinchRotate.js';
import _ol_interaction_PinchZoom_ from './interaction/PinchZoom.js';
var _ol_interaction_ = {};
/**
@@ -36,24 +38,24 @@ goog.require('ol.interaction.PinchZoom');
* interactions to be used with the ol.Map constructor's interactions option.
* @api
*/
ol.interaction.defaults = function(opt_options) {
_ol_interaction_.defaults = function(opt_options) {
var options = opt_options ? opt_options : {};
var interactions = new ol.Collection();
var interactions = new _ol_Collection_();
var kinetic = new ol.Kinetic(-0.005, 0.05, 100);
var kinetic = new _ol_Kinetic_(-0.005, 0.05, 100);
var altShiftDragRotate = options.altShiftDragRotate !== undefined ?
options.altShiftDragRotate : true;
if (altShiftDragRotate) {
interactions.push(new ol.interaction.DragRotate());
interactions.push(new _ol_interaction_DragRotate_());
}
var doubleClickZoom = options.doubleClickZoom !== undefined ?
options.doubleClickZoom : true;
if (doubleClickZoom) {
interactions.push(new ol.interaction.DoubleClickZoom({
interactions.push(new _ol_interaction_DoubleClickZoom_({
delta: options.zoomDelta,
duration: options.zoomDuration
}));
@@ -61,7 +63,7 @@ ol.interaction.defaults = function(opt_options) {
var dragPan = options.dragPan !== undefined ? options.dragPan : true;
if (dragPan) {
interactions.push(new ol.interaction.DragPan({
interactions.push(new _ol_interaction_DragPan_({
kinetic: kinetic
}));
}
@@ -69,12 +71,12 @@ ol.interaction.defaults = function(opt_options) {
var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :
true;
if (pinchRotate) {
interactions.push(new ol.interaction.PinchRotate());
interactions.push(new _ol_interaction_PinchRotate_());
}
var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;
if (pinchZoom) {
interactions.push(new ol.interaction.PinchZoom({
interactions.push(new _ol_interaction_PinchZoom_({
constrainResolution: options.constrainResolution,
duration: options.zoomDuration
}));
@@ -82,8 +84,8 @@ ol.interaction.defaults = function(opt_options) {
var keyboard = options.keyboard !== undefined ? options.keyboard : true;
if (keyboard) {
interactions.push(new ol.interaction.KeyboardPan());
interactions.push(new ol.interaction.KeyboardZoom({
interactions.push(new _ol_interaction_KeyboardPan_());
interactions.push(new _ol_interaction_KeyboardZoom_({
delta: options.zoomDelta,
duration: options.zoomDuration
}));
@@ -92,7 +94,7 @@ ol.interaction.defaults = function(opt_options) {
var mouseWheelZoom = options.mouseWheelZoom !== undefined ?
options.mouseWheelZoom : true;
if (mouseWheelZoom) {
interactions.push(new ol.interaction.MouseWheelZoom({
interactions.push(new _ol_interaction_MouseWheelZoom_({
constrainResolution: options.constrainResolution,
duration: options.zoomDuration
}));
@@ -101,7 +103,7 @@ ol.interaction.defaults = function(opt_options) {
var shiftDragZoom = options.shiftDragZoom !== undefined ?
options.shiftDragZoom : true;
if (shiftDragZoom) {
interactions.push(new ol.interaction.DragZoom({
interactions.push(new _ol_interaction_DragZoom_({
duration: options.zoomDuration
}));
}
@@ -109,3 +111,4 @@ ol.interaction.defaults = function(opt_options) {
return interactions;
};
export default _ol_interaction_;