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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let onlyLinear = true;
|
|
||||||
let canBeLinear = false;
|
let canBeLinear = false;
|
||||||
for (const element of elements) {
|
for (const element of elements) {
|
||||||
if (
|
if (
|
||||||
|
@ -653,17 +652,10 @@ export const getSwitchCategoryFromElements = (
|
||||||
) {
|
) {
|
||||||
return "generic";
|
return "generic";
|
||||||
}
|
}
|
||||||
if (element.type !== "arrow" && element.type !== "line") {
|
|
||||||
onlyLinear = false;
|
|
||||||
canBeLinear = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (onlyLinear) {
|
|
||||||
if (isLinearElement(element) && isLinearElementElligible(element)) {
|
if (isLinearElement(element) && isLinearElementElligible(element)) {
|
||||||
canBeLinear = true;
|
canBeLinear = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (canBeLinear) {
|
if (canBeLinear) {
|
||||||
return "linear";
|
return "linear";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue