Skip to content

Commit

Permalink
Decreased debounce timeout to 10ms
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-danylchenko committed Aug 28, 2024
1 parent da40d2c commit 5baebe7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/text-annotator/src/SelectionHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const createSelectionHandler = (
// select events don't have offsetX/offsetY - reuse last up/down)
selection.userSelect(currentTarget.annotation, lastPointerDown);
}
})
}, 10)

document.addEventListener('selectionchange', onSelectionChange);

Expand Down
2 changes: 1 addition & 1 deletion packages/text-annotator/src/highlight/baseRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const createBaseRenderer = (
currentPainter.reset();

redraw();
});
}, 10);

window.addEventListener('resize', onResize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const createRenderer = (container: HTMLElement): RendererImplementation => {
});
});

const onResize = debounce(() => resetCanvas(canvas));
const onResize = debounce(() => resetCanvas(canvas), 10);

window.addEventListener('resize', onResize);

Expand Down

0 comments on commit 5baebe7

Please sign in to comment.