Implement support for {start,end}_tap actions.

This commit is contained in:
Dermot Duffy
2022-01-25 22:01:09 -08:00
parent 6119423b41
commit de763f3e56
5 changed files with 69 additions and 20 deletions
+5
View File
@@ -117,6 +117,8 @@ class ActionHandler extends HTMLElement implements ActionHandler {
this.held = true;
}, this.holdTime);
}
fireEvent(element, 'action', { action: 'start_tap' });
};
const end = (ev: Event): void => {
@@ -133,6 +135,9 @@ class ActionHandler extends HTMLElement implements ActionHandler {
this.stopAnimation();
this.timer = undefined;
}
fireEvent(element, 'action', { action: 'end_tap' });
if (options?.hasHold && this.held) {
fireEvent(element, 'action', { action: 'hold' });
} else if (options?.hasDoubleClick) {