Change the way threads are displayed

This commit is contained in:
Jon Staab
2024-10-23 10:20:03 -07:00
parent a382facc70
commit 00e1795d0d
6 changed files with 31 additions and 34 deletions
@@ -1,4 +1,5 @@
<script lang="ts">
import {throttle} from "throttle-debounce"
import {type Instance} from "tippy.js"
import type {NativeEmoji} from "emoji-picker-element/shared"
import {between} from "@welshman/lib"
@@ -24,13 +25,13 @@
popover.hide()
}
const onMouseMove = ({clientX, clientY}: any) => {
const onMouseMove = throttle(300, ({clientX, clientY}: any) => {
const {x, y, width, height} = popover.popper.getBoundingClientRect()
if (!between([x, x + width], clientX) || !between([y, y + height + 30], clientY)) {
if (!between([x, x + width], clientX) || !between([y - 30, y + height + 30], clientY)) {
popover.hide()
}
}
})
let popover: Instance
</script>