Rename _ol_interaction_DragRotateAndZoom_ to DragRotateAndZoom
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import _ol_Map_ from '../src/ol/Map.js';
|
||||
import _ol_View_ from '../src/ol/View.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_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
|
||||
|
||||
var map = new _ol_Map_({
|
||||
interactions: _ol_interaction_.defaults().extend([
|
||||
new _ol_interaction_DragRotateAndZoom_()
|
||||
new DragRotateAndZoom()
|
||||
]),
|
||||
layers: [
|
||||
new _ol_layer_Tile_({
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_View_ from '../src/ol/View.js';
|
||||
import _ol_control_ from '../src/ol/control.js';
|
||||
import FullScreen from '../src/ol/control/FullScreen.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_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
|
||||
@@ -13,7 +13,7 @@ var map = new _ol_Map_({
|
||||
new FullScreen()
|
||||
]),
|
||||
interactions: _ol_interaction_.defaults().extend([
|
||||
new _ol_interaction_DragRotateAndZoom_()
|
||||
new DragRotateAndZoom()
|
||||
]),
|
||||
layers: [
|
||||
new _ol_layer_Tile_({
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_View_ from '../src/ol/View.js';
|
||||
import _ol_control_ from '../src/ol/control.js';
|
||||
import OverviewMap from '../src/ol/control/OverviewMap.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_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
|
||||
@@ -29,7 +29,7 @@ var map = new _ol_Map_({
|
||||
overviewMapControl
|
||||
]),
|
||||
interactions: _ol_interaction_.defaults().extend([
|
||||
new _ol_interaction_DragRotateAndZoom_()
|
||||
new DragRotateAndZoom()
|
||||
]),
|
||||
layers: [
|
||||
new _ol_layer_Tile_({
|
||||
|
||||
@@ -23,14 +23,14 @@ import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
||||
* @param {olx.interaction.DragRotateAndZoomOptions=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
var _ol_interaction_DragRotateAndZoom_ = function(opt_options) {
|
||||
var DragRotateAndZoom = function(opt_options) {
|
||||
|
||||
var options = opt_options ? opt_options : {};
|
||||
|
||||
_ol_interaction_Pointer_.call(this, {
|
||||
handleDownEvent: _ol_interaction_DragRotateAndZoom_.handleDownEvent_,
|
||||
handleDragEvent: _ol_interaction_DragRotateAndZoom_.handleDragEvent_,
|
||||
handleUpEvent: _ol_interaction_DragRotateAndZoom_.handleUpEvent_
|
||||
handleDownEvent: DragRotateAndZoom.handleDownEvent_,
|
||||
handleDragEvent: DragRotateAndZoom.handleDragEvent_,
|
||||
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}
|
||||
* @private
|
||||
*/
|
||||
_ol_interaction_DragRotateAndZoom_.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
|
||||
return;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ _ol_interaction_DragRotateAndZoom_.handleDragEvent_ = function(mapBrowserEvent)
|
||||
* @this {ol.interaction.DragRotateAndZoom}
|
||||
* @private
|
||||
*/
|
||||
_ol_interaction_DragRotateAndZoom_.handleUpEvent_ = function(mapBrowserEvent) {
|
||||
DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
|
||||
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
|
||||
return true;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ _ol_interaction_DragRotateAndZoom_.handleUpEvent_ = function(mapBrowserEvent) {
|
||||
* @this {ol.interaction.DragRotateAndZoom}
|
||||
* @private
|
||||
*/
|
||||
_ol_interaction_DragRotateAndZoom_.handleDownEvent_ = function(mapBrowserEvent) {
|
||||
DragRotateAndZoom.handleDownEvent_ = function(mapBrowserEvent) {
|
||||
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
|
||||
return false;
|
||||
}
|
||||
@@ -147,4 +147,4 @@ _ol_interaction_DragRotateAndZoom_.handleDownEvent_ = function(mapBrowserEvent)
|
||||
return false;
|
||||
}
|
||||
};
|
||||
export default _ol_interaction_DragRotateAndZoom_;
|
||||
export default DragRotateAndZoom;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.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 _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
@@ -12,8 +12,8 @@ describe('ol.interaction.DragRotateAndZoom', function() {
|
||||
describe('constructor', function() {
|
||||
|
||||
it('can be constructed without arguments', function() {
|
||||
var instance = new _ol_interaction_DragRotateAndZoom_();
|
||||
expect(instance).to.be.an(_ol_interaction_DragRotateAndZoom_);
|
||||
var instance = new DragRotateAndZoom();
|
||||
expect(instance).to.be.an(DragRotateAndZoom);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -36,7 +36,7 @@ describe('ol.interaction.DragRotateAndZoom', function() {
|
||||
document.body.appendChild(target);
|
||||
var source = new _ol_source_Vector_();
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
interaction = new _ol_interaction_DragRotateAndZoom_();
|
||||
interaction = new DragRotateAndZoom();
|
||||
map = new _ol_Map_({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
|
||||
Reference in New Issue
Block a user