Remove 'pointerup' listener in ol.control.Rotate
This commit is contained in:
@@ -11,7 +11,6 @@ goog.require('ol.animation');
|
|||||||
goog.require('ol.control.Control');
|
goog.require('ol.control.Control');
|
||||||
goog.require('ol.css');
|
goog.require('ol.css');
|
||||||
goog.require('ol.easing');
|
goog.require('ol.easing');
|
||||||
goog.require('ol.pointer.PointerEventHandler');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -49,10 +48,6 @@ ol.control.Rotate = function(opt_options) {
|
|||||||
'title': tipLabel
|
'title': tipLabel
|
||||||
}, this.label_);
|
}, this.label_);
|
||||||
|
|
||||||
var handler = new ol.pointer.PointerEventHandler(button);
|
|
||||||
this.registerDisposable(handler);
|
|
||||||
goog.events.listen(handler, ol.pointer.EventType.POINTERUP,
|
|
||||||
ol.control.Rotate.prototype.handlePointerUp_, false, this);
|
|
||||||
goog.events.listen(button, goog.events.EventType.CLICK,
|
goog.events.listen(button, goog.events.EventType.CLICK,
|
||||||
ol.control.Rotate.prototype.handleClick_, false, this);
|
ol.control.Rotate.prototype.handleClick_, false, this);
|
||||||
|
|
||||||
@@ -103,19 +98,7 @@ goog.inherits(ol.control.Rotate, ol.control.Control);
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.control.Rotate.prototype.handleClick_ = function(event) {
|
ol.control.Rotate.prototype.handleClick_ = function(event) {
|
||||||
if (event.screenX !== 0 && event.screenY !== 0) {
|
event.preventDefault();
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.resetNorth_();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {ol.pointer.PointerEvent} pointerEvent The event to handle
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
ol.control.Rotate.prototype.handlePointerUp_ = function(pointerEvent) {
|
|
||||||
pointerEvent.browserEvent.preventDefault();
|
|
||||||
this.resetNorth_();
|
this.resetNorth_();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user