Fix global settings (#572)
Some PR made the settings UI show up even though nothing is selected. However, you couldn't actually change any of those settings except for the colors. This PR pipes through the rest of the properties so everything works now!
This commit is contained in:
parent
8ab176b9a5
commit
5853fba821
@ -120,6 +120,7 @@ export const actionChangeFillStyle: Action = {
|
|||||||
appState.editingElement,
|
appState.editingElement,
|
||||||
elements,
|
elements,
|
||||||
element => element.fillStyle,
|
element => element.fillStyle,
|
||||||
|
appState.currentItemFillStyle,
|
||||||
)}
|
)}
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
updateData(value);
|
updateData(value);
|
||||||
@ -155,6 +156,7 @@ export const actionChangeStrokeWidth: Action = {
|
|||||||
appState.editingElement,
|
appState.editingElement,
|
||||||
elements,
|
elements,
|
||||||
element => element.strokeWidth,
|
element => element.strokeWidth,
|
||||||
|
appState.currentItemStrokeWidth,
|
||||||
)}
|
)}
|
||||||
onChange={value => updateData(value)}
|
onChange={value => updateData(value)}
|
||||||
/>
|
/>
|
||||||
@ -188,6 +190,7 @@ export const actionChangeSloppiness: Action = {
|
|||||||
appState.editingElement,
|
appState.editingElement,
|
||||||
elements,
|
elements,
|
||||||
element => element.roughness,
|
element => element.roughness,
|
||||||
|
appState.currentItemRoughness,
|
||||||
)}
|
)}
|
||||||
onChange={value => updateData(value)}
|
onChange={value => updateData(value)}
|
||||||
/>
|
/>
|
||||||
@ -220,7 +223,7 @@ export const actionChangeOpacity: Action = {
|
|||||||
appState.editingElement,
|
appState.editingElement,
|
||||||
elements,
|
elements,
|
||||||
element => element.opacity,
|
element => element.opacity,
|
||||||
100 /* default opacity */,
|
appState.currentItemOpacity,
|
||||||
) ?? undefined
|
) ?? undefined
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -268,6 +271,7 @@ export const actionChangeFontSize: Action = {
|
|||||||
appState.editingElement,
|
appState.editingElement,
|
||||||
elements,
|
elements,
|
||||||
element => isTextElement(element) && +element.font.split("px ")[0],
|
element => isTextElement(element) && +element.font.split("px ")[0],
|
||||||
|
+(appState.currentItemFont || "20px Virgil").split("px ")[0],
|
||||||
)}
|
)}
|
||||||
onChange={value => updateData(value)}
|
onChange={value => updateData(value)}
|
||||||
/>
|
/>
|
||||||
@ -314,6 +318,7 @@ export const actionChangeFontFamily: Action = {
|
|||||||
appState.editingElement,
|
appState.editingElement,
|
||||||
elements,
|
elements,
|
||||||
element => isTextElement(element) && element.font.split("px ")[1],
|
element => isTextElement(element) && element.font.split("px ")[1],
|
||||||
|
(appState.currentItemFont || "20px Virgil").split("px ")[1],
|
||||||
)}
|
)}
|
||||||
onChange={value => updateData(value)}
|
onChange={value => updateData(value)}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user