Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion frontend/src/components/floating-menus/MenuList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@

function onEntryPointerLeave(menuListEntry: MenuListEntry) {
if (!menuListEntry.children?.length) {
dispatch("hoverOutEntry");
return;
}

Expand All @@ -263,6 +262,11 @@
}
}

function onPointerLeave() {
dispatch("hoverOutEntry");
return;
}

function includeSeparator(entries: MenuListEntry[][], section: MenuListEntry[], sectionIndex: number, search: string): boolean {
const elementsBeforeCurrentSection = entries
.slice(0, sectionIndex)
Expand Down Expand Up @@ -465,6 +469,7 @@
bind:this={scroller}
scrollableY={scrollableY && virtualScrollingEntryHeight !== 0}
on:scroll={onScroll}
on:pointerleave={onPointerLeave}
styles={{ "min-width": virtualScrollingEntryHeight ? `${minWidth}px` : `inherit` }}
>
{#if virtualScrollingEntryHeight}
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/panels/Layers.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,14 @@
.control-bar {
height: 32px;
flex: 0 0 auto;
margin: 0 4px;
padding-left: 4px;
padding-right: 15px;
Comment thread
Praashh marked this conversation as resolved.

border-bottom: 1px solid var(--color-2-mildblack);
justify-content: space-between;
justify-content: space-evenly;

.widget-span:first-child {
flex: 1 1 auto;
flex: 1 0.5 auto;
}

&:not(:has(*)) {
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/components/widgets/inputs/DropdownInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
let activeEntry = makeActiveEntry();
let activeEntrySkipWatcher = false;
let initialSelectedIndex: number | undefined = undefined;
let activeEntryOnOpen: string | undefined = undefined;
let open = false;

$: watchSelectedIndex(selectedIndex);
Expand All @@ -54,7 +55,18 @@
$: watchOpen(open);

function watchOpen(open: boolean) {
initialSelectedIndex = open ? selectedIndex : undefined;
if (open) {
initialSelectedIndex = selectedIndex;
activeEntryOnOpen = activeEntry.value;
} else {
// Suppress hoverOutEntry if a new selection was made
const selectionMade = activeEntryOnOpen !== undefined && activeEntry.value !== activeEntryOnOpen;
Comment thread
Praashh marked this conversation as resolved.
if (initialSelectedIndex !== undefined && !selectionMade) {
dispatch("hoverOutEntry", initialSelectedIndex);
}
initialSelectedIndex = undefined;
activeEntryOnOpen = undefined;
}
}

// Called only when `selectedIndex` is changed from outside this component
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/widgets/inputs/FieldInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

<style lang="scss">
.field-input {
min-width: 80px;
min-width: 70px;
height: auto;
position: relative;
border-radius: 2px;
Expand Down