fix: slider value resets to the default value when opacity is 0 (#516)
This commit is contained in:
parent
48024c9116
commit
3f1075cbcd
@ -26,9 +26,9 @@ const getFormValue = function<T>(
|
|||||||
defaultValue?: T
|
defaultValue?: T
|
||||||
): T | null {
|
): T | null {
|
||||||
return (
|
return (
|
||||||
(editingElement && getAttribute(editingElement)) ||
|
(editingElement && getAttribute(editingElement)) ??
|
||||||
getCommonAttributeOfSelectedElements(elements, getAttribute) ||
|
getCommonAttributeOfSelectedElements(elements, getAttribute) ??
|
||||||
defaultValue ||
|
defaultValue ??
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -211,7 +211,7 @@ export const actionChangeOpacity: Action = {
|
|||||||
elements,
|
elements,
|
||||||
element => element.opacity,
|
element => element.opacity,
|
||||||
100 /* default opacity */
|
100 /* default opacity */
|
||||||
) || undefined
|
) ?? undefined
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user