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
+15 -13
View File
@@ -1,9 +1,9 @@
goog.provide('ol.interaction.DoubleClickZoom');
goog.require('ol');
goog.require('ol.MapBrowserEventType');
goog.require('ol.interaction.Interaction');
/**
* @module ol/interaction/DoubleClickZoom
*/
import _ol_ from '../index.js';
import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
/**
* @classdesc
@@ -14,7 +14,7 @@ goog.require('ol.interaction.Interaction');
* @param {olx.interaction.DoubleClickZoomOptions=} opt_options Options.
* @api
*/
ol.interaction.DoubleClickZoom = function(opt_options) {
var _ol_interaction_DoubleClickZoom_ = function(opt_options) {
var options = opt_options ? opt_options : {};
@@ -24,8 +24,8 @@ ol.interaction.DoubleClickZoom = function(opt_options) {
*/
this.delta_ = options.delta ? options.delta : 1;
ol.interaction.Interaction.call(this, {
handleEvent: ol.interaction.DoubleClickZoom.handleEvent
_ol_interaction_Interaction_.call(this, {
handleEvent: _ol_interaction_DoubleClickZoom_.handleEvent
});
/**
@@ -35,7 +35,8 @@ ol.interaction.DoubleClickZoom = function(opt_options) {
this.duration_ = options.duration !== undefined ? options.duration : 250;
};
ol.inherits(ol.interaction.DoubleClickZoom, ol.interaction.Interaction);
_ol_.inherits(_ol_interaction_DoubleClickZoom_, _ol_interaction_Interaction_);
/**
@@ -46,18 +47,19 @@ ol.inherits(ol.interaction.DoubleClickZoom, ol.interaction.Interaction);
* @this {ol.interaction.DoubleClickZoom}
* @api
*/
ol.interaction.DoubleClickZoom.handleEvent = function(mapBrowserEvent) {
_ol_interaction_DoubleClickZoom_.handleEvent = function(mapBrowserEvent) {
var stopEvent = false;
var browserEvent = mapBrowserEvent.originalEvent;
if (mapBrowserEvent.type == ol.MapBrowserEventType.DBLCLICK) {
if (mapBrowserEvent.type == _ol_MapBrowserEventType_.DBLCLICK) {
var map = mapBrowserEvent.map;
var anchor = mapBrowserEvent.coordinate;
var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;
var view = map.getView();
ol.interaction.Interaction.zoomByDelta(
_ol_interaction_Interaction_.zoomByDelta(
view, delta, anchor, this.duration_);
mapBrowserEvent.preventDefault();
stopEvent = true;
}
return !stopEvent;
};
export default _ol_interaction_DoubleClickZoom_;