[+] Matcha pointer
This commit is contained in:
+3
-3
@@ -62,6 +62,7 @@
|
||||
let perpendicular = dir === 'bottom' || dir === 'top' ? 'left' : 'top'
|
||||
obj[perpendicular] = `calc(${pos * 100}% - 100px)`
|
||||
|
||||
// Disable transition for the initial position
|
||||
divEl.style.transition = `none`
|
||||
divEl.style.cssText = Object.keys(obj).map(key => `${key}: ${obj[key]}`).join('; ')
|
||||
await sleep(0.1)
|
||||
@@ -88,9 +89,8 @@
|
||||
imgEl.style.cssText = Object.keys(obj).map(key => `${key}: ${obj[key]}`).join('; ')
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
setTimeout(() => divStyles(), 100)
|
||||
})
|
||||
onMount(() => setTimeout(divStyles, 100)
|
||||
)
|
||||
</script>
|
||||
|
||||
<main>
|
||||
|
||||
@@ -16,3 +16,6 @@ body
|
||||
margin: 0
|
||||
width: 100%
|
||||
height: 100%
|
||||
|
||||
*
|
||||
cursor: url("./matcha_cursor.png") 16 16, auto
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Reference in New Issue
Block a user