mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 22:18:11 +08:00
Svelte bug fixes and code cleanup (#1074)
* Fix middle click tab close * Fix swapping colors in the ColorPicker * Cleanup * Fix field inputs * Fix tab key-based navigation * Fix ColorPicker reseting Initial color when opened * Prevent backend fighting with user dragging NumberInput * Remaining fixes and comment cleanup
This commit is contained in:
@@ -32,13 +32,13 @@
|
||||
$: selectedIndex, watchSelectedIndex();
|
||||
$: watchActiveEntry(activeEntry);
|
||||
|
||||
// Called only when `selectedIndex` is changed from outside this component (with v-model)
|
||||
// Called only when `selectedIndex` is changed from outside this component
|
||||
function watchSelectedIndex() {
|
||||
activeEntrySkipWatcher = true;
|
||||
activeEntry = makeActiveEntry();
|
||||
}
|
||||
|
||||
// Called when `activeEntry` is changed by the `v-model` on this component's MenuList component, or by the `selectedIndex()` watcher above (but we want to skip that case)
|
||||
// Called when the `activeEntry` two-way binding on this component's MenuList component is changed, or by the `selectedIndex()` watcher above (but we want to skip that case)
|
||||
function watchActiveEntry(activeEntry: MenuListEntry) {
|
||||
if (activeEntrySkipWatcher) {
|
||||
activeEntrySkipWatcher = false;
|
||||
|
||||
Reference in New Issue
Block a user