Centralize handling of mouseleave to hide the side-panel
This commit is contained in:
parent
f1ef46cda1
commit
fc64f9f987
@ -8,16 +8,11 @@
|
|||||||
function handleMouseover() {
|
function handleMouseover() {
|
||||||
dispatch('mouseover', info);
|
dispatch('mouseover', info);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMouseout() {
|
|
||||||
dispatch('mouseout');
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="p-3 cursor-pointer text-center"
|
class="p-3 cursor-pointer text-center"
|
||||||
on:mouseenter={handleMouseover}
|
on:mouseenter={handleMouseover}
|
||||||
on:mouseleave={handleMouseout}
|
|
||||||
>
|
>
|
||||||
<i class='{icon} fa-xl'></i>
|
<i class='{icon} fa-xl'></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-row w-14 bg-neutral-700">
|
<div class="flex flex-row w-14 bg-neutral-700" on:mouseleave={hideInfo}>
|
||||||
<div class="flex flex-col shrink-0 w-14 text-gray-300">
|
<div class="flex flex-col shrink-0 w-14 text-gray-300">
|
||||||
{#each icons as i}
|
{#each icons as i}
|
||||||
{#if i}
|
{#if i}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user