Skip to content
This repository was archived by the owner on Apr 2, 2023. It is now read-only.

Commit 98e1b43

Browse files
author
Rainer Simon
committed
Issue #68
1 parent a5916e9 commit 98e1b43

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/selection/rect_drag_selector.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,11 @@ annotorious.plugins.selection.RectDragSelector.prototype._attachListeners = func
8888
{ mouseEvent: event, shape: shape, viewportBounds: self.getViewportBounds() });
8989
} else {
9090
self._annotator.fireEvent(annotorious.events.EventType.SELECTION_CANCELED);
91-
if (annotorious.events.ui.hasTouch) {
92-
// In touch mode, we use this to "relay" the selection event
93-
var annotations = self._annotator.getAnnotationsAt(points.x, points.y);
94-
if (annotations.length > 0)
95-
self._annotator.highlightAnnotation(annotations[0]);
96-
}
91+
92+
// On cancel, we "relay" the selection event to the annotator
93+
var annotations = self._annotator.getAnnotationsAt(points.x, points.y);
94+
if (annotations.length > 0)
95+
self._annotator.highlightAnnotation(annotations[0]);
9796
}
9897
});
9998
}

0 commit comments

Comments
 (0)