mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Set shape background to be transparent by default (#330)
Also makes "Clear canvas" reset the entire app state
This commit is contained in:
parent
3db7d69849
commit
d45f48e60f
3 changed files with 27 additions and 23 deletions
|
@ -1,6 +1,7 @@
|
|||
import React from "react";
|
||||
import { Action } from "./types";
|
||||
import { ColorPicker } from "../components/ColorPicker";
|
||||
import { getDefaultAppState } from "../appState";
|
||||
|
||||
export const actionChangeViewBackgroundColor: Action = {
|
||||
name: "changeViewBackgroundColor",
|
||||
|
@ -24,12 +25,7 @@ export const actionClearCanvas: Action = {
|
|||
perform: (elements, appState, value) => {
|
||||
return {
|
||||
elements: [],
|
||||
appState: {
|
||||
...appState,
|
||||
viewBackgroundColor: "#ffffff",
|
||||
scrollX: 0,
|
||||
scrollY: 0
|
||||
}
|
||||
appState: getDefaultAppState()
|
||||
};
|
||||
},
|
||||
PanelComponent: ({ updateData }) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue