Move ol.ROTATE_ANIMATION_DURATION const to a constructor option
This commit is contained in:
@@ -3,7 +3,6 @@ goog.provide('ol.interaction.PinchRotate');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.functions');
|
||||
goog.require('goog.style');
|
||||
goog.require('ol');
|
||||
goog.require('ol.Coordinate');
|
||||
goog.require('ol.ViewHint');
|
||||
goog.require('ol.interaction.Interaction');
|
||||
@@ -61,6 +60,12 @@ ol.interaction.PinchRotate = function(opt_options) {
|
||||
*/
|
||||
this.threshold_ = goog.isDef(options.threshold) ? options.threshold : 0.3;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.duration_ = goog.isDef(options.duration) ? options.duration : 250;
|
||||
|
||||
};
|
||||
goog.inherits(ol.interaction.PinchRotate, ol.interaction.Pointer);
|
||||
|
||||
@@ -131,7 +136,7 @@ ol.interaction.PinchRotate.handleUpEvent_ = function(mapBrowserEvent) {
|
||||
if (this.rotating_) {
|
||||
var rotation = view.getRotation();
|
||||
ol.interaction.Interaction.rotate(
|
||||
map, view, rotation, this.anchor_, ol.ROTATE_ANIMATION_DURATION);
|
||||
map, view, rotation, this.anchor_, this.duration_);
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user