Rename _ol_interaction_DragPan_ to DragPan
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
import _ol_Collection_ from './Collection.js';
|
import _ol_Collection_ from './Collection.js';
|
||||||
import _ol_Kinetic_ from './Kinetic.js';
|
import _ol_Kinetic_ from './Kinetic.js';
|
||||||
import DoubleClickZoom from './interaction/DoubleClickZoom.js';
|
import DoubleClickZoom from './interaction/DoubleClickZoom.js';
|
||||||
import _ol_interaction_DragPan_ from './interaction/DragPan.js';
|
import DragPan from './interaction/DragPan.js';
|
||||||
import _ol_interaction_DragRotate_ from './interaction/DragRotate.js';
|
import _ol_interaction_DragRotate_ from './interaction/DragRotate.js';
|
||||||
import _ol_interaction_DragZoom_ from './interaction/DragZoom.js';
|
import _ol_interaction_DragZoom_ from './interaction/DragZoom.js';
|
||||||
import _ol_interaction_KeyboardPan_ from './interaction/KeyboardPan.js';
|
import _ol_interaction_KeyboardPan_ from './interaction/KeyboardPan.js';
|
||||||
@@ -63,7 +63,7 @@ _ol_interaction_.defaults = function(opt_options) {
|
|||||||
|
|
||||||
var dragPan = options.dragPan !== undefined ? options.dragPan : true;
|
var dragPan = options.dragPan !== undefined ? options.dragPan : true;
|
||||||
if (dragPan) {
|
if (dragPan) {
|
||||||
interactions.push(new _ol_interaction_DragPan_({
|
interactions.push(new DragPan({
|
||||||
kinetic: kinetic
|
kinetic: kinetic
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
|||||||
* @param {olx.interaction.DragPanOptions=} opt_options Options.
|
* @param {olx.interaction.DragPanOptions=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
var _ol_interaction_DragPan_ = function(opt_options) {
|
var DragPan = function(opt_options) {
|
||||||
|
|
||||||
_ol_interaction_Pointer_.call(this, {
|
_ol_interaction_Pointer_.call(this, {
|
||||||
handleDownEvent: _ol_interaction_DragPan_.handleDownEvent_,
|
handleDownEvent: DragPan.handleDownEvent_,
|
||||||
handleDragEvent: _ol_interaction_DragPan_.handleDragEvent_,
|
handleDragEvent: DragPan.handleDragEvent_,
|
||||||
handleUpEvent: _ol_interaction_DragPan_.handleUpEvent_
|
handleUpEvent: DragPan.handleUpEvent_
|
||||||
});
|
});
|
||||||
|
|
||||||
var options = opt_options ? opt_options : {};
|
var options = opt_options ? opt_options : {};
|
||||||
@@ -59,7 +59,7 @@ var _ol_interaction_DragPan_ = function(opt_options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_interaction_DragPan_, _ol_interaction_Pointer_);
|
inherits(DragPan, _ol_interaction_Pointer_);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,7 +67,7 @@ inherits(_ol_interaction_DragPan_, _ol_interaction_Pointer_);
|
|||||||
* @this {ol.interaction.DragPan}
|
* @this {ol.interaction.DragPan}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_ol_interaction_DragPan_.handleDragEvent_ = function(mapBrowserEvent) {
|
DragPan.handleDragEvent_ = function(mapBrowserEvent) {
|
||||||
var targetPointers = this.targetPointers;
|
var targetPointers = this.targetPointers;
|
||||||
var centroid =
|
var centroid =
|
||||||
_ol_interaction_Pointer_.centroid(targetPointers);
|
_ol_interaction_Pointer_.centroid(targetPointers);
|
||||||
@@ -104,7 +104,7 @@ _ol_interaction_DragPan_.handleDragEvent_ = function(mapBrowserEvent) {
|
|||||||
* @this {ol.interaction.DragPan}
|
* @this {ol.interaction.DragPan}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_ol_interaction_DragPan_.handleUpEvent_ = function(mapBrowserEvent) {
|
DragPan.handleUpEvent_ = function(mapBrowserEvent) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
var view = map.getView();
|
var view = map.getView();
|
||||||
if (this.targetPointers.length === 0) {
|
if (this.targetPointers.length === 0) {
|
||||||
@@ -143,7 +143,7 @@ _ol_interaction_DragPan_.handleUpEvent_ = function(mapBrowserEvent) {
|
|||||||
* @this {ol.interaction.DragPan}
|
* @this {ol.interaction.DragPan}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_ol_interaction_DragPan_.handleDownEvent_ = function(mapBrowserEvent) {
|
DragPan.handleDownEvent_ = function(mapBrowserEvent) {
|
||||||
if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {
|
if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
var view = map.getView();
|
var view = map.getView();
|
||||||
@@ -171,5 +171,5 @@ _ol_interaction_DragPan_.handleDownEvent_ = function(mapBrowserEvent) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_interaction_DragPan_.prototype.shouldStopEvent = FALSE;
|
DragPan.prototype.shouldStopEvent = FALSE;
|
||||||
export default _ol_interaction_DragPan_;
|
export default DragPan;
|
||||||
|
|||||||
Reference in New Issue
Block a user