diff options
| author | Fuwn <[email protected]> | 2024-04-16 15:36:42 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-04-16 15:36:42 -0700 |
| commit | d01162d603cd8ff52e0419f50cdb13b789702645 (patch) | |
| tree | 215744928997d7d9de9f6aec5bfb3ee1feb8a276 /src/stores | |
| parent | fix(tooltip): fix despawn on quick hover (diff) | |
| download | due.moe-d01162d603cd8ff52e0419f50cdb13b789702645.tar.xz due.moe-d01162d603cd8ff52e0419f50cdb13b789702645.zip | |
feat(tooltip): sliding tooltip
Diffstat (limited to 'src/stores')
| -rw-r--r-- | src/stores/tooltipPosition.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/stores/tooltipPosition.ts b/src/stores/tooltipPosition.ts new file mode 100644 index 00000000..06b38fe1 --- /dev/null +++ b/src/stores/tooltipPosition.ts @@ -0,0 +1,12 @@ +import { cubicOut } from 'svelte/easing'; +import { tweened } from 'svelte/motion'; + +const tooltipPosition = tweened( + { x: 0, y: 0 }, + { + duration: 200 * 1.75, + easing: cubicOut + } +); + +export default tooltipPosition; |