mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add optional watermark on export (#1365)
* Add optional watermark on export * Address init PR feedback * Add SVG export with refactoring * Update export.ts * Move addWatermark to appState * Update snapshots * Fit watermark in small scene * Rename watermark things Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
parent
13cea081f3
commit
5822117e23
11 changed files with 349 additions and 9 deletions
|
@ -42,6 +42,26 @@ export const actionChangeExportBackground = register({
|
|||
),
|
||||
});
|
||||
|
||||
export const actionChangeShouldAddWatermark = register({
|
||||
name: "changeShouldAddWatermark",
|
||||
perform: (_elements, appState, value) => {
|
||||
return {
|
||||
appState: { ...appState, shouldAddWatermark: value },
|
||||
commitToHistory: false,
|
||||
};
|
||||
},
|
||||
PanelComponent: ({ appState, updateData }) => (
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={appState.shouldAddWatermark}
|
||||
onChange={(event) => updateData(event.target.checked)}
|
||||
/>{" "}
|
||||
{t("labels.addWatermark")}
|
||||
</label>
|
||||
),
|
||||
});
|
||||
|
||||
export const actionSaveScene = register({
|
||||
name: "saveScene",
|
||||
perform: (elements, appState, value) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue