Revert 400 and 420 (#422)

* revert #400 font file

* Revert "Revert "Set scale for export images (#416)" (#420)"

This reverts commit d603921234.
This commit is contained in:
David Luzar 2020-01-17 15:43:24 +01:00 committed by Lipis
parent d603921234
commit 6892348c3d
10 changed files with 88 additions and 62 deletions

View file

@ -478,18 +478,23 @@ export class App extends React.Component<{}, AppState> {
appState={this.state}
actionManager={this.actionManager}
syncActionResult={this.syncActionResult}
onExportToPng={exportedElements => {
onExportToPng={(exportedElements, scale) => {
if (this.canvas)
exportCanvas("png", exportedElements, this.canvas, this.state);
exportCanvas("png", exportedElements, this.canvas, {
exportBackground: this.state.exportBackground,
name: this.state.name,
viewBackgroundColor: this.state.viewBackgroundColor,
scale
});
}}
onExportToClipboard={exportedElements => {
onExportToClipboard={(exportedElements, scale) => {
if (this.canvas)
exportCanvas(
"clipboard",
exportedElements,
this.canvas,
this.state
);
exportCanvas("clipboard", exportedElements, this.canvas, {
exportBackground: this.state.exportBackground,
name: this.state.name,
viewBackgroundColor: this.state.viewBackgroundColor,
scale
});
}}
/>
{this.actionManager.renderAction(