Remove 'pointerup' listener in ol.control.Attribution
This commit is contained in:
@@ -12,7 +12,6 @@ goog.require('goog.style');
|
||||
goog.require('ol.Attribution');
|
||||
goog.require('ol.control.Control');
|
||||
goog.require('ol.css');
|
||||
goog.require('ol.pointer.PointerEventHandler');
|
||||
|
||||
|
||||
|
||||
@@ -97,10 +96,6 @@ ol.control.Attribution = function(opt_options) {
|
||||
'title': tipLabel
|
||||
}, this.labelSpan_);
|
||||
|
||||
var buttonHandler = new ol.pointer.PointerEventHandler(button);
|
||||
this.registerDisposable(buttonHandler);
|
||||
goog.events.listen(buttonHandler, ol.pointer.EventType.POINTERUP,
|
||||
this.handlePointerUp_, false, this);
|
||||
goog.events.listen(button, goog.events.EventType.CLICK,
|
||||
this.handleClick_, false, this);
|
||||
|
||||
@@ -330,19 +325,7 @@ ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
|
||||
* @private
|
||||
*/
|
||||
ol.control.Attribution.prototype.handleClick_ = function(event) {
|
||||
if (event.screenX !== 0 && event.screenY !== 0) {
|
||||
return;
|
||||
}
|
||||
this.handleToggle_();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.pointer.PointerEvent} pointerEvent The event to handle
|
||||
* @private
|
||||
*/
|
||||
ol.control.Attribution.prototype.handlePointerUp_ = function(pointerEvent) {
|
||||
pointerEvent.browserEvent.preventDefault();
|
||||
event.preventDefault();
|
||||
this.handleToggle_();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user