Skip to content

Commit

Permalink
Updated events
Browse files Browse the repository at this point in the history
Events are always normalized in HERE Maps JS API v3. The list of
supported event is valid across all platform and is the following:

pointerdown
pointerup
pointermove
pointerenter
pointerleave
pointercancel
dragstart
drag
dragend
tap
dbltap
longpress
  • Loading branch information
mmarcon committed Aug 26, 2015
1 parent 07bc541 commit 375bb90
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/modules/config.js
Expand Up @@ -31,30 +31,24 @@ export const defaults = {
}
};

const mouse = 'pointer';
const click = 'tap';
const pointer = 'pointer';
const tap = 'tap';
const drag = 'drag';
const touch = 'touch';
const start = 'start';
const end = 'end';
const move = 'move';

export const supportedEvents = [
click,
'dbl' + click,
mouse + 'up',
mouse + 'down',
mouse + move,
mouse + 'over',
mouse + 'out',
mouse + 'enter',
mouse + 'leave',
'longpress',
pointer + 'down', /*mousedown, touchstart, pointerdown*/
pointer + 'up', /*mouseup, touchend, pointerup*/
pointer + move, /*mousemove, touchmove, pointermove*/
pointer + 'enter', /*mouseenter, touchenter, pointerenter*/
pointer + 'leave', /*mouseleave, touchleave, pointerleave*/
pointer + 'cancel', /*touchcancel, pointercancel*/
drag + start,
drag,
drag + end,
'resize',
touch + start,
touch + end,
touch + move
tap, /*click, tap*/
'dbl' + tap,
'longpress'
];

0 comments on commit 375bb90

Please sign in to comment.