Restyle Implement Fuzzy search using rapidfuzz (#60)

This commit is contained in:
restyled-io[bot]
2022-05-26 19:12:04 +03:00
committed by GitHub
parent 1a3a196d7a
commit 2b33fb87a2
15 changed files with 90 additions and 74 deletions
+2 -1
View File
@@ -3,7 +3,8 @@ import { getElem } from "./perks";
export default (mouseX, mouseY) => {
const scope = getElem("app", "id");
const contextMenu = getElem("context-menu", "class");
// ? compute what is the mouse position relative to the container element (scope)
// ? compute what is the mouse position relative to the container element
// (scope)
let { left: scopeOffsetX, top: scopeOffsetY } = scope.getBoundingClientRect();
scopeOffsetX = scopeOffsetX < 0 ? 0 : scopeOffsetX;