fix: merge issue and forgotten debug
This commit is contained in:
parent
23cf5fb475
commit
2d6469a695
@ -178,13 +178,13 @@ export const actionFinalize = register({
|
|||||||
newElements = newElements.filter((el) => el.id !== element!.id);
|
newElements = newElements.filter((el) => el.id !== element!.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLineElement(element) || isFreeDrawElement(element)) {
|
if (isLinearElement(element) || isFreeDrawElement(element)) {
|
||||||
// If the multi point line closes the loop,
|
// If the multi point line closes the loop,
|
||||||
// set the last point to first point.
|
// set the last point to first point.
|
||||||
// This ensures that loop remains closed at different scales.
|
// This ensures that loop remains closed at different scales.
|
||||||
const isLoop = isPathALoop(element.points, appState.zoom.value);
|
const isLoop = isPathALoop(element.points, appState.zoom.value);
|
||||||
|
|
||||||
if (isLoop) {
|
if (isLoop && (isLineElement(element) || isFreeDrawElement(element))) {
|
||||||
const linePoints = element.points;
|
const linePoints = element.points;
|
||||||
const firstPoint = linePoints[0];
|
const firstPoint = linePoints[0];
|
||||||
const points: LocalPoint[] = linePoints.map((p, index) =>
|
const points: LocalPoint[] = linePoints.map((p, index) =>
|
||||||
|
@ -586,10 +586,10 @@ function CommandPaletteInner({
|
|||||||
});
|
});
|
||||||
|
|
||||||
setAllCommands(allCommands);
|
setAllCommands(allCommands);
|
||||||
// setLastUsed(
|
setLastUsed(
|
||||||
// allCommands.find((command) => command.label === lastUsed?.label) ??
|
allCommands.find((command) => command.label === lastUsed?.label) ??
|
||||||
// null,
|
null,
|
||||||
// );
|
);
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
stableDeps,
|
stableDeps,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user