mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 19:48:12 +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:
@@ -67,8 +67,11 @@
|
||||
$: sliderStepValue = isInteger ? (step === undefined ? 1 : step) : "any";
|
||||
$: watchValue(value);
|
||||
|
||||
// Called only when `value` is changed from outside this component (with v-model)
|
||||
// Called only when `value` is changed from outside this component
|
||||
function watchValue(value: number | undefined) {
|
||||
// Don't update if the slider is currently being dragged (we don't want the backend fighting with the user's drag)
|
||||
if (rangeSliderClickDragState === "dragging") return;
|
||||
|
||||
// Draw a dash if the value is undefined
|
||||
if (value === undefined) {
|
||||
text = "-";
|
||||
|
||||
Reference in New Issue
Block a user