mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: exporting labelled arrows via export utils (#6443)
* fix: exporting labelled arrows via export utils * add comments * lint * update changelog * fix lint * initialize scene in the utils so it can be availabe in the helper functions * fix library rendering * add comments
This commit is contained in:
parent
13b27afe0f
commit
ca3be2c678
3 changed files with 50 additions and 12 deletions
|
@ -2,7 +2,7 @@ import clsx from "clsx";
|
|||
import oc from "open-color";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useDevice } from "../components/App";
|
||||
import { exportToSvg } from "../scene/export";
|
||||
import { exportToSvg } from "../packages/utils";
|
||||
import { LibraryItem } from "../types";
|
||||
import "./LibraryUnit.scss";
|
||||
import { CheckboxItem } from "./CheckboxItem";
|
||||
|
@ -36,14 +36,14 @@ export const LibraryUnit = ({
|
|||
if (!elements) {
|
||||
return;
|
||||
}
|
||||
const svg = await exportToSvg(
|
||||
const svg = await exportToSvg({
|
||||
elements,
|
||||
{
|
||||
appState: {
|
||||
exportBackground: false,
|
||||
viewBackgroundColor: oc.white,
|
||||
},
|
||||
null,
|
||||
);
|
||||
files: null,
|
||||
});
|
||||
svg.querySelector(".style-fonts")?.remove();
|
||||
node.innerHTML = svg.outerHTML;
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue