Add click event as responsive alternative to singleclick
The singleclick event makes the application feel slow because of the 250 ms delay that is used to rule out a dblclick.
This commit is contained in:
@@ -54,12 +54,13 @@ describe('ol.MapBrowserEventHandler', function() {
|
||||
});
|
||||
|
||||
it('emulates dblclick', function() {
|
||||
handler.emulateClick_({
|
||||
type: 'mousedown',
|
||||
target: target,
|
||||
clientX: 0,
|
||||
clientY: 0
|
||||
});
|
||||
handler.emulateClick_(new ol.pointer.PointerEvent('pointerdown',
|
||||
new goog.events.BrowserEvent({
|
||||
type: 'mousedown',
|
||||
target: target,
|
||||
clientX: 0,
|
||||
clientY: 0
|
||||
})));
|
||||
expect(singleclickSpy.called).to.not.be.ok();
|
||||
expect(dblclickSpy.called).to.not.be.ok();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user