mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-23 09:21:00 +02:00
lint
This commit is contained in:
@@ -1529,10 +1529,7 @@ export const actionChangeContainerBehavior = register({
|
||||
|
||||
// collect directly selected eligible containers
|
||||
for (const el of selected) {
|
||||
if (
|
||||
isFlowchartNodeElement(el) &&
|
||||
getBoundTextElement(el, elementsMap)
|
||||
) {
|
||||
if (isFlowchartNodeElement(el) && getBoundTextElement(el, elementsMap)) {
|
||||
containerIdsToUpdate.add(el.id);
|
||||
}
|
||||
}
|
||||
@@ -1603,8 +1600,7 @@ export const actionChangeContainerBehavior = register({
|
||||
// case 2: any eligible containers directly selected
|
||||
targetContainers = selected.filter(
|
||||
(el) =>
|
||||
isFlowchartNodeElement(el) &&
|
||||
getBoundTextElement(el, elementsMap),
|
||||
isFlowchartNodeElement(el) && getBoundTextElement(el, elementsMap),
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -151,11 +151,13 @@ export const SelectedShapeActions = ({
|
||||
isSingleElementBoundContainer = true;
|
||||
}
|
||||
|
||||
const textContainer = targetElements.length === 1 && isTextElement(targetElements[0])
|
||||
? getContainerElement(targetElements[0], elementsMap)
|
||||
: null;
|
||||
const textContainer =
|
||||
targetElements.length === 1 && isTextElement(targetElements[0])
|
||||
? getContainerElement(targetElements[0], elementsMap)
|
||||
: null;
|
||||
|
||||
const isStickyNoteContainer = textContainer && isFlowchartNodeElement(textContainer);
|
||||
const isStickyNoteContainer =
|
||||
textContainer && isFlowchartNodeElement(textContainer);
|
||||
|
||||
const isEditingTextOrNewElement = Boolean(
|
||||
appState.editingTextElement || appState.newElement,
|
||||
@@ -241,7 +243,7 @@ export const SelectedShapeActions = ({
|
||||
renderAction("changeTextAlign")}
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
{shouldAllowVerticalAlign(targetElements, elementsMap) &&
|
||||
renderAction("changeVerticalAlign")}
|
||||
{(canHaveArrowheads(appState.activeTool.type) ||
|
||||
@@ -250,7 +252,7 @@ export const SelectedShapeActions = ({
|
||||
)}
|
||||
|
||||
{isStickyNoteContainer && <>{renderAction("changeContainerBehavior")}</>}
|
||||
|
||||
|
||||
{renderAction("changeOpacity")}
|
||||
|
||||
<fieldset>
|
||||
@@ -344,11 +346,13 @@ export const CompactShapeActions = ({
|
||||
appState.editingTextElement || appState.newElement,
|
||||
);
|
||||
|
||||
const textContainer = targetElements.length === 1 && isTextElement(targetElements[0])
|
||||
? getContainerElement(targetElements[0], elementsMap)
|
||||
: null;
|
||||
const textContainer =
|
||||
targetElements.length === 1 && isTextElement(targetElements[0])
|
||||
? getContainerElement(targetElements[0], elementsMap)
|
||||
: null;
|
||||
|
||||
const isStickyNoteContainer = textContainer && isFlowchartNodeElement(textContainer);
|
||||
const isStickyNoteContainer =
|
||||
textContainer && isFlowchartNodeElement(textContainer);
|
||||
|
||||
const showFillIcons =
|
||||
(hasBackground(appState.activeTool.type) &&
|
||||
@@ -632,7 +636,9 @@ export const CompactShapeActions = ({
|
||||
renderAction("changeTextAlign")}
|
||||
{shouldAllowVerticalAlign(targetElements, elementsMap) &&
|
||||
renderAction("changeVerticalAlign")}
|
||||
{isStickyNoteContainer && <>{renderAction("changeContainerBehavior")}</>}
|
||||
{isStickyNoteContainer && (
|
||||
<>{renderAction("changeContainerBehavior")}</>
|
||||
)}
|
||||
</div>
|
||||
</PropertiesPopover>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user