mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: slider value resets to the default value when opacity is 0 (#516)
This commit is contained in:
parent
48024c9116
commit
3f1075cbcd
1 changed files with 4 additions and 4 deletions
|
@ -26,9 +26,9 @@ const getFormValue = function<T>(
|
|||
defaultValue?: T
|
||||
): T | null {
|
||||
return (
|
||||
(editingElement && getAttribute(editingElement)) ||
|
||||
getCommonAttributeOfSelectedElements(elements, getAttribute) ||
|
||||
defaultValue ||
|
||||
(editingElement && getAttribute(editingElement)) ??
|
||||
getCommonAttributeOfSelectedElements(elements, getAttribute) ??
|
||||
defaultValue ??
|
||||
null
|
||||
);
|
||||
};
|
||||
|
@ -211,7 +211,7 @@ export const actionChangeOpacity: Action = {
|
|||
elements,
|
||||
element => element.opacity,
|
||||
100 /* default opacity */
|
||||
) || undefined
|
||||
) ?? undefined
|
||||
}
|
||||
/>
|
||||
</>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue