mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
SVG export (#598)
* first draft of export to SVG. WIP * enabled text rendeing - which is not quite right atm * placeholder svg icon * size the canvas based on the bounding box of elements * Do not add opacity attributes if default * render background rect * Ensure arrows are in the same SVG group * parse font-size from font * export web fonts * use fixed locations for fonts * Rename export functions * renamed export file * oops broke the icon.
This commit is contained in:
parent
321e4022b0
commit
97b11b0f53
16 changed files with 447 additions and 202 deletions
|
@ -564,6 +564,16 @@ export class App extends React.Component<any, AppState> {
|
|||
scale,
|
||||
});
|
||||
}}
|
||||
onExportToSvg={(exportedElements, scale) => {
|
||||
if (this.canvas) {
|
||||
exportCanvas("svg", exportedElements, this.canvas, {
|
||||
exportBackground: this.state.exportBackground,
|
||||
name: this.state.name,
|
||||
viewBackgroundColor: this.state.viewBackgroundColor,
|
||||
scale,
|
||||
});
|
||||
}
|
||||
}}
|
||||
onExportToClipboard={(exportedElements, scale) => {
|
||||
if (this.canvas)
|
||||
exportCanvas("clipboard", exportedElements, this.canvas, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue