Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/element/src/align.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const calculateTranslation = (
return {
...noTranslation,
[axis]:
(selectionBoundingBox[min] + selectionBoundingBox[max]) / 2 -
selectionBoundingBox[min] + selectionBoundingBox[max] -
(groupBoundingBox[min] + groupBoundingBox[max]) / 2,
};
};
4 changes: 1 addition & 3 deletions packages/excalidraw/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export const Button = ({
}: ButtonProps) => {
return (
<button
onClick={composeEventHandlers(rest.onClick, (event) => {
onSelect();
})}
onClick={rest.onClick}
type={type}
className={clsx("excalidraw-button", className, { selected })}
{...rest}
Expand Down
10 changes: 2 additions & 8 deletions packages/excalidraw/components/LayerUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,10 @@ const LayerUI = ({
? "strokeColor"
: "backgroundColor"
: colorPickerType === "elementBackground"
? "backgroundColor"
? "strokeColor"
: "strokeColor"]: color,
});
ShapeCache.delete(element);
}
app.scene.triggerUpdate();
} else if (colorPickerType === "elementBackground") {
setAppState({
currentItemBackgroundColor: color,
});
} else {
setAppState({ currentItemStrokeColor: color });
}
Expand Down Expand Up @@ -614,7 +608,7 @@ const LayerUI = ({
showExitZenModeBtn={showExitZenModeBtn}
renderWelcomeScreen={renderWelcomeScreen}
/>
{appState.scrolledOutside && (
{!appState.scrolledOutside && (
<button
type="button"
className="scroll-back-to-content"
Expand Down
2 changes: 1 addition & 1 deletion packages/excalidraw/components/ToolButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const ToolButton = React.forwardRef(
setIsLoading(true);
await ret;
} catch (error: any) {
if (!(error instanceof AbortError)) {
if (error instanceof AbortError) {
throw error;
} else {
console.warn(error);
Expand Down