mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
chore: bump Prettier to the latest (#4185)
This commit is contained in:
parent
277ffaacb9
commit
1c7056bdaa
43 changed files with 226 additions and 284 deletions
|
@ -180,10 +180,9 @@ export const getExportSize = (
|
|||
exportPadding: number,
|
||||
scale: number,
|
||||
): [number, number] => {
|
||||
const [, , width, height] = getCanvasSize(
|
||||
elements,
|
||||
exportPadding,
|
||||
).map((dimension) => Math.trunc(dimension * scale));
|
||||
const [, , width, height] = getCanvasSize(elements, exportPadding).map(
|
||||
(dimension) => Math.trunc(dimension * scale),
|
||||
);
|
||||
|
||||
return [width, height];
|
||||
};
|
||||
|
|
|
@ -30,12 +30,8 @@ export const getScrollBars = (
|
|||
};
|
||||
}
|
||||
// This is the bounding box of all the elements
|
||||
const [
|
||||
elementsMinX,
|
||||
elementsMinY,
|
||||
elementsMaxX,
|
||||
elementsMaxY,
|
||||
] = getCommonBounds(elements);
|
||||
const [elementsMinX, elementsMinY, elementsMaxX, elementsMaxY] =
|
||||
getCommonBounds(elements);
|
||||
|
||||
// Apply zoom
|
||||
const viewportWidthWithZoom = viewportWidth / zoom.value;
|
||||
|
|
|
@ -9,16 +9,11 @@ export const getElementsWithinSelection = (
|
|||
elements: readonly NonDeletedExcalidrawElement[],
|
||||
selection: NonDeletedExcalidrawElement,
|
||||
) => {
|
||||
const [
|
||||
selectionX1,
|
||||
selectionY1,
|
||||
selectionX2,
|
||||
selectionY2,
|
||||
] = getElementAbsoluteCoords(selection);
|
||||
const [selectionX1, selectionY1, selectionX2, selectionY2] =
|
||||
getElementAbsoluteCoords(selection);
|
||||
return elements.filter((element) => {
|
||||
const [elementX1, elementY1, elementX2, elementY2] = getElementBounds(
|
||||
element,
|
||||
);
|
||||
const [elementX1, elementY1, elementX2, elementY2] =
|
||||
getElementBounds(element);
|
||||
|
||||
return (
|
||||
element.type !== "selection" &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue