debug preview fix
This commit is contained in:
parent
113dfc0023
commit
7762b925ae
@ -79,7 +79,10 @@ import {
|
|||||||
} from "./components/ExportToExcalidrawPlus";
|
} from "./components/ExportToExcalidrawPlus";
|
||||||
import { updateStaleImageStatuses } from "./data/FileManager";
|
import { updateStaleImageStatuses } from "./data/FileManager";
|
||||||
import { newElementWith } from "../packages/excalidraw/element/mutateElement";
|
import { newElementWith } from "../packages/excalidraw/element/mutateElement";
|
||||||
import { isInitializedImageElement } from "../packages/excalidraw/element/typeChecks";
|
import {
|
||||||
|
isInitializedImageElement,
|
||||||
|
isRectangularElement,
|
||||||
|
} from "../packages/excalidraw/element/typeChecks";
|
||||||
import { loadFilesFromFirebase } from "./data/firebase";
|
import { loadFilesFromFirebase } from "./data/firebase";
|
||||||
import {
|
import {
|
||||||
LibraryIndexedDBAdapter,
|
LibraryIndexedDBAdapter,
|
||||||
@ -641,16 +644,15 @@ const ExcalidrawWrapper = () => {
|
|||||||
collabAPI.syncElements(elements);
|
collabAPI.syncElements(elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
const nonDeletedElements = getNonDeletedElements(elements);
|
||||||
const frame = elements.find(
|
|
||||||
(el) => el.strokeStyle === "dashed" && !el.isDeleted,
|
const frame = nonDeletedElements.find(
|
||||||
|
(el) => el.strokeStyle === "dashed" && el.type === "rectangle",
|
||||||
);
|
);
|
||||||
|
|
||||||
exportToCanvas({
|
exportToCanvas({
|
||||||
data: {
|
data: {
|
||||||
elements: getNonDeletedElements(elements).filter(
|
elements: nonDeletedElements.filter((x) => x.id !== frame?.id),
|
||||||
(x) => x.id !== frame?.id,
|
|
||||||
),
|
|
||||||
// .concat(
|
// .concat(
|
||||||
// restoreElements(
|
// restoreElements(
|
||||||
// [
|
// [
|
||||||
@ -723,7 +725,6 @@ const ExcalidrawWrapper = () => {
|
|||||||
// canvas.style.width = "100%";
|
// canvas.style.width = "100%";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
// this check is redundant, but since this is a hot path, it's best
|
// this check is redundant, but since this is a hot path, it's best
|
||||||
// not to evaludate the nested expression every time
|
// not to evaludate the nested expression every time
|
||||||
|
Loading…
x
Reference in New Issue
Block a user