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);
|
||||
}
|
||||
|
||||
if (isLineElement(element) || isFreeDrawElement(element)) {
|
||||
if (isLinearElement(element) || isFreeDrawElement(element)) {
|
||||
// If the multi point line closes the loop,
|
||||
// set the last point to first point.
|
||||
// This ensures that loop remains closed at different scales.
|
||||
const isLoop = isPathALoop(element.points, appState.zoom.value);
|
||||
|
||||
if (isLoop) {
|
||||
if (isLoop && (isLineElement(element) || isFreeDrawElement(element))) {
|
||||
const linePoints = element.points;
|
||||
const firstPoint = linePoints[0];
|
||||
const points: LocalPoint[] = linePoints.map((p, index) =>
|
||||
|
@ -586,10 +586,10 @@ function CommandPaletteInner({
|
||||
});
|
||||
|
||||
setAllCommands(allCommands);
|
||||
// setLastUsed(
|
||||
// allCommands.find((command) => command.label === lastUsed?.label) ??
|
||||
// null,
|
||||
// );
|
||||
setLastUsed(
|
||||
allCommands.find((command) => command.label === lastUsed?.label) ??
|
||||
null,
|
||||
);
|
||||
}
|
||||
}, [
|
||||
stableDeps,
|
||||
|
Loading…
x
Reference in New Issue
Block a user