Rename _ol_interaction_DragRotateAndZoom_ to DragRotateAndZoom

This commit is contained in:
Marc Jansen
2017-12-15 10:28:27 +01:00
committed by Tim Schaub
parent 3a933df1f1
commit ea08212df6
5 changed files with 19 additions and 19 deletions

View File

@@ -1,14 +1,14 @@
import _ol_Map_ from '../src/ol/Map.js'; import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js'; import _ol_View_ from '../src/ol/View.js';
import _ol_interaction_ from '../src/ol/interaction.js'; import _ol_interaction_ from '../src/ol/interaction.js';
import _ol_interaction_DragRotateAndZoom_ from '../src/ol/interaction/DragRotateAndZoom.js'; import DragRotateAndZoom from '../src/ol/interaction/DragRotateAndZoom.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js'; import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
var map = new _ol_Map_({ var map = new _ol_Map_({
interactions: _ol_interaction_.defaults().extend([ interactions: _ol_interaction_.defaults().extend([
new _ol_interaction_DragRotateAndZoom_() new DragRotateAndZoom()
]), ]),
layers: [ layers: [
new _ol_layer_Tile_({ new _ol_layer_Tile_({

View File

@@ -3,7 +3,7 @@ import _ol_View_ from '../src/ol/View.js';
import _ol_control_ from '../src/ol/control.js'; import _ol_control_ from '../src/ol/control.js';
import FullScreen from '../src/ol/control/FullScreen.js'; import FullScreen from '../src/ol/control/FullScreen.js';
import _ol_interaction_ from '../src/ol/interaction.js'; import _ol_interaction_ from '../src/ol/interaction.js';
import _ol_interaction_DragRotateAndZoom_ from '../src/ol/interaction/DragRotateAndZoom.js'; import DragRotateAndZoom from '../src/ol/interaction/DragRotateAndZoom.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js'; import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
@@ -13,7 +13,7 @@ var map = new _ol_Map_({
new FullScreen() new FullScreen()
]), ]),
interactions: _ol_interaction_.defaults().extend([ interactions: _ol_interaction_.defaults().extend([
new _ol_interaction_DragRotateAndZoom_() new DragRotateAndZoom()
]), ]),
layers: [ layers: [
new _ol_layer_Tile_({ new _ol_layer_Tile_({

View File

@@ -3,7 +3,7 @@ import _ol_View_ from '../src/ol/View.js';
import _ol_control_ from '../src/ol/control.js'; import _ol_control_ from '../src/ol/control.js';
import OverviewMap from '../src/ol/control/OverviewMap.js'; import OverviewMap from '../src/ol/control/OverviewMap.js';
import _ol_interaction_ from '../src/ol/interaction.js'; import _ol_interaction_ from '../src/ol/interaction.js';
import _ol_interaction_DragRotateAndZoom_ from '../src/ol/interaction/DragRotateAndZoom.js'; import DragRotateAndZoom from '../src/ol/interaction/DragRotateAndZoom.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js'; import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
@@ -29,7 +29,7 @@ var map = new _ol_Map_({
overviewMapControl overviewMapControl
]), ]),
interactions: _ol_interaction_.defaults().extend([ interactions: _ol_interaction_.defaults().extend([
new _ol_interaction_DragRotateAndZoom_() new DragRotateAndZoom()
]), ]),
layers: [ layers: [
new _ol_layer_Tile_({ new _ol_layer_Tile_({

View File

@@ -23,14 +23,14 @@ import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
* @param {olx.interaction.DragRotateAndZoomOptions=} opt_options Options. * @param {olx.interaction.DragRotateAndZoomOptions=} opt_options Options.
* @api * @api
*/ */
var _ol_interaction_DragRotateAndZoom_ = function(opt_options) { var DragRotateAndZoom = function(opt_options) {
var options = opt_options ? opt_options : {}; var options = opt_options ? opt_options : {};
_ol_interaction_Pointer_.call(this, { _ol_interaction_Pointer_.call(this, {
handleDownEvent: _ol_interaction_DragRotateAndZoom_.handleDownEvent_, handleDownEvent: DragRotateAndZoom.handleDownEvent_,
handleDragEvent: _ol_interaction_DragRotateAndZoom_.handleDragEvent_, handleDragEvent: DragRotateAndZoom.handleDragEvent_,
handleUpEvent: _ol_interaction_DragRotateAndZoom_.handleUpEvent_ handleUpEvent: DragRotateAndZoom.handleUpEvent_
}); });
/** /**
@@ -66,7 +66,7 @@ var _ol_interaction_DragRotateAndZoom_ = function(opt_options) {
}; };
inherits(_ol_interaction_DragRotateAndZoom_, _ol_interaction_Pointer_); inherits(DragRotateAndZoom, _ol_interaction_Pointer_);
/** /**
@@ -74,7 +74,7 @@ inherits(_ol_interaction_DragRotateAndZoom_, _ol_interaction_Pointer_);
* @this {ol.interaction.DragRotateAndZoom} * @this {ol.interaction.DragRotateAndZoom}
* @private * @private
*/ */
_ol_interaction_DragRotateAndZoom_.handleDragEvent_ = function(mapBrowserEvent) { DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) { if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
return; return;
} }
@@ -110,7 +110,7 @@ _ol_interaction_DragRotateAndZoom_.handleDragEvent_ = function(mapBrowserEvent)
* @this {ol.interaction.DragRotateAndZoom} * @this {ol.interaction.DragRotateAndZoom}
* @private * @private
*/ */
_ol_interaction_DragRotateAndZoom_.handleUpEvent_ = function(mapBrowserEvent) { DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) { if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
return true; return true;
} }
@@ -133,7 +133,7 @@ _ol_interaction_DragRotateAndZoom_.handleUpEvent_ = function(mapBrowserEvent) {
* @this {ol.interaction.DragRotateAndZoom} * @this {ol.interaction.DragRotateAndZoom}
* @private * @private
*/ */
_ol_interaction_DragRotateAndZoom_.handleDownEvent_ = function(mapBrowserEvent) { DragRotateAndZoom.handleDownEvent_ = function(mapBrowserEvent) {
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) { if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
return false; return false;
} }
@@ -147,4 +147,4 @@ _ol_interaction_DragRotateAndZoom_.handleDownEvent_ = function(mapBrowserEvent)
return false; return false;
} }
}; };
export default _ol_interaction_DragRotateAndZoom_; export default DragRotateAndZoom;

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../../../../src/ol/Map.js'; import _ol_Map_ from '../../../../src/ol/Map.js';
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js'; import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
import _ol_View_ from '../../../../src/ol/View.js'; import _ol_View_ from '../../../../src/ol/View.js';
import _ol_interaction_DragRotateAndZoom_ from '../../../../src/ol/interaction/DragRotateAndZoom.js'; import DragRotateAndZoom from '../../../../src/ol/interaction/DragRotateAndZoom.js';
import Interaction from '../../../../src/ol/interaction/Interaction.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
@@ -12,8 +12,8 @@ describe('ol.interaction.DragRotateAndZoom', function() {
describe('constructor', function() { describe('constructor', function() {
it('can be constructed without arguments', function() { it('can be constructed without arguments', function() {
var instance = new _ol_interaction_DragRotateAndZoom_(); var instance = new DragRotateAndZoom();
expect(instance).to.be.an(_ol_interaction_DragRotateAndZoom_); expect(instance).to.be.an(DragRotateAndZoom);
}); });
}); });
@@ -36,7 +36,7 @@ describe('ol.interaction.DragRotateAndZoom', function() {
document.body.appendChild(target); document.body.appendChild(target);
var source = new _ol_source_Vector_(); var source = new _ol_source_Vector_();
var layer = new _ol_layer_Vector_({source: source}); var layer = new _ol_layer_Vector_({source: source});
interaction = new _ol_interaction_DragRotateAndZoom_(); interaction = new DragRotateAndZoom();
map = new _ol_Map_({ map = new _ol_Map_({
target: target, target: target,
layers: [layer], layers: [layer],