Modify comments
This commit is contained in:
@@ -325,8 +325,8 @@ ol.MapBrowserEventHandler.prototype.handlePointerMove_ =
|
|||||||
// Fix IE10 on windows Surface : When you tap the tablet, it triggers
|
// Fix IE10 on windows Surface : When you tap the tablet, it triggers
|
||||||
// multiple pointermove events between pointerdown and pointerup with
|
// multiple pointermove events between pointerdown and pointerup with
|
||||||
// the exact same coordinates of the pointerdown event. To avoid a
|
// the exact same coordinates of the pointerdown event. To avoid a
|
||||||
// 'false' touchmove event to be dispatched , we test if the pointermove
|
// 'false' touchmove event to be dispatched , we test if the pointer
|
||||||
// event has different coordinates.
|
// effectively moved.
|
||||||
if (browserEvent.clientX != this.down_.clientX ||
|
if (browserEvent.clientX != this.down_.clientX ||
|
||||||
browserEvent.clientY != this.down_.clientY) {
|
browserEvent.clientY != this.down_.clientY) {
|
||||||
this.dragged_ = true;
|
this.dragged_ = true;
|
||||||
@@ -347,8 +347,10 @@ ol.MapBrowserEventHandler.prototype.handlePointerUp_ = function(browserEvent) {
|
|||||||
this.dispatchEvent(newEvent);
|
this.dispatchEvent(newEvent);
|
||||||
goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);
|
goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);
|
||||||
|
|
||||||
// We emulate click event only on mouse left button action,
|
// We emulate click event on left mouse button click, touch contact, and pen
|
||||||
// on touch devices isMouseActionButton always returns true.
|
// contact. isMouseActionButton returns true in these cases (evt.button is set
|
||||||
|
// to 0).
|
||||||
|
// See http://www.w3.org/TR/pointerevents/#button-states .
|
||||||
if (!this.dragged_ && browserEvent.isMouseActionButton()) {
|
if (!this.dragged_ && browserEvent.isMouseActionButton()) {
|
||||||
goog.asserts.assert(!goog.isNull(this.down_));
|
goog.asserts.assert(!goog.isNull(this.down_));
|
||||||
this.emulateClick_(this.down_);
|
this.emulateClick_(this.down_);
|
||||||
|
|||||||
Reference in New Issue
Block a user