mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: remove watermark code (#3639)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
parent
abebf9aff8
commit
dd12abc583
20 changed files with 21 additions and 200 deletions
|
@ -11,6 +11,17 @@ The change should be grouped under one of the below section and must contain PR
|
|||
Please add the latest change on the top under the correct section.
|
||||
-->
|
||||
|
||||
## Unreleased
|
||||
|
||||
## Excalidraw API
|
||||
|
||||
### Refactor
|
||||
|
||||
#### BREAKING CHANGE
|
||||
|
||||
- Removed `shouldAddWatermark: boolean` attribute from options for [export](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#export-utilities) APIs [#3639](https://github.com/excalidraw/excalidraw/pull/3639).
|
||||
- Removed `appState.shouldAddWatermark` so in case you were passing `shouldAddWatermark` in [initialData.AppState](https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L42) it will not work anymore.
|
||||
|
||||
## 0.8.0 (2021-05-15)
|
||||
|
||||
## Excalidraw API
|
||||
|
|
|
@ -823,5 +823,4 @@ This function returns a svg with the exported elements.
|
|||
| --- | --- | --- | --- |
|
||||
| exportBackground | boolean | true | Indicates whether background should be exported |
|
||||
| viewBackgroundColor | string | #fff | The default background color |
|
||||
| shouldAddWatermark | boolean | false | Indicates whether watermark should be exported |
|
||||
| exportWithDarkMode | boolean | false | Indicates whether to export with dark mode |
|
||||
|
|
|
@ -829,5 +829,4 @@ This function returns a svg with the exported elements.
|
|||
| --- | --- | --- | --- |
|
||||
| exportBackground | boolean | true | Indicates whether background should be exported |
|
||||
| viewBackgroundColor | string | #fff | The default background color |
|
||||
| shouldAddWatermark | boolean | false | Indicates whether watermark should be exported |
|
||||
| exportWithDarkMode | boolean | false | Indicates whether to export with dark mode |
|
||||
|
|
|
@ -26,15 +26,11 @@ export const exportToCanvas = ({
|
|||
{ elements, appState },
|
||||
null,
|
||||
);
|
||||
const {
|
||||
exportBackground,
|
||||
viewBackgroundColor,
|
||||
shouldAddWatermark,
|
||||
} = restoredAppState;
|
||||
const { exportBackground, viewBackgroundColor } = restoredAppState;
|
||||
return _exportToCanvas(
|
||||
getNonDeletedElements(restoredElements),
|
||||
{ ...restoredAppState, offsetTop: 0, offsetLeft: 0, width: 0, height: 0 },
|
||||
{ exportBackground, viewBackgroundColor, shouldAddWatermark },
|
||||
{ exportBackground, viewBackgroundColor },
|
||||
(width: number, height: number) => {
|
||||
const canvas = document.createElement("canvas");
|
||||
const ret = getDimensions(width, height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue