mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Update actionProperties.tsx
This commit is contained in:
parent
af3b93c410
commit
61cf47a403
1 changed files with 11 additions and 0 deletions
|
@ -201,12 +201,23 @@ export const actionChangeStrokeColor = register({
|
|||
name: "changeStrokeColor",
|
||||
trackEvent: false,
|
||||
perform: (elements, appState, value) => {
|
||||
const containers = getSelectedElements(elements, appState, false)
|
||||
.filter((el) => el.boundElements)
|
||||
.map((el) => el.id);
|
||||
return {
|
||||
...(value.currentItemStrokeColor && {
|
||||
elements: changeProperty(
|
||||
elements,
|
||||
appState,
|
||||
(el) => {
|
||||
if (
|
||||
isTextElement(el) &&
|
||||
el.containerId &&
|
||||
containers.includes(el.containerId) &&
|
||||
getContainerElement(el)?.strokeColor !== el.strokeColor
|
||||
) {
|
||||
return el;
|
||||
}
|
||||
return hasStrokeColor(el.type)
|
||||
? newElementWith(el, {
|
||||
strokeColor: value.currentItemStrokeColor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue