mirror of
https://github.com/immich-app/immich.git
synced 2025-01-16 00:36:47 +01:00
wip: recalculate position when the title changes
This commit is contained in:
parent
3baebff162
commit
6c9ea9f7f4
1 changed files with 7 additions and 0 deletions
|
@ -84,6 +84,7 @@
|
|||
$: colorClass = colorClasses[color];
|
||||
$: mobileClass = hideMobile ? 'hidden sm:flex' : '';
|
||||
$: paddingClass = paddingClasses[padding];
|
||||
$: recalculatePosition(title);
|
||||
|
||||
const id = $$restProps.id ?? generateId();
|
||||
|
||||
|
@ -124,6 +125,12 @@
|
|||
left = box.left + box.width / 2 - offsetWidth / 2;
|
||||
});
|
||||
};
|
||||
|
||||
const recalculatePosition = (title: string) => {
|
||||
if (showPopover && title) {
|
||||
onShowPopover();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
|
|
Loading…
Reference in a new issue