Skip to content

Commit

Permalink
AG-NONE Fix onMouseEvent pop logic
Browse files Browse the repository at this point in the history
  • Loading branch information
olegat committed Dec 11, 2024
1 parent aeb64cf commit 85a3606
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function initClickSequencing(
const sequence: MouseEvent[] = [];
const onMouseEvent = (ev: MouseEvent): void => {
sequence.push(ev);
if (sequence.length > 2) sequence.splice(1);
if (sequence.length > 2) sequence.shift();
};
const onClick = (ev: MouseEvent): void => {
if (sequence.length === 2) {
Expand Down Expand Up @@ -126,7 +126,7 @@ function initDblClickSequencing(
const sequence: MouseEvent[] = [];
const onMouseEvent = (ev: MouseEvent): void => {
sequence.push(ev);
if (sequence.length > 4) sequence.splice(1);
if (sequence.length > 4) sequence.shift();
};
const onDblClick = (ev: MouseEvent): void => {
if (sequence.length === 4) {
Expand Down

0 comments on commit 85a3606

Please sign in to comment.