mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
can change linear when it's linear + non-generic
This commit is contained in:
parent
721f5ec0f4
commit
2b66da4305
1 changed files with 2 additions and 10 deletions
|
@ -643,7 +643,6 @@ export const getSwitchCategoryFromElements = (
|
|||
return null;
|
||||
}
|
||||
|
||||
let onlyLinear = true;
|
||||
let canBeLinear = false;
|
||||
for (const element of elements) {
|
||||
if (
|
||||
|
@ -653,15 +652,8 @@ export const getSwitchCategoryFromElements = (
|
|||
) {
|
||||
return "generic";
|
||||
}
|
||||
if (element.type !== "arrow" && element.type !== "line") {
|
||||
onlyLinear = false;
|
||||
canBeLinear = false;
|
||||
}
|
||||
|
||||
if (onlyLinear) {
|
||||
if (isLinearElement(element) && isLinearElementElligible(element)) {
|
||||
canBeLinear = true;
|
||||
}
|
||||
if (isLinearElement(element) && isLinearElementElligible(element)) {
|
||||
canBeLinear = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue