Skip to content

Commit

Permalink
fix: transparent background
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Apr 27, 2020
1 parent 5512cd3 commit e9d401b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ export const Canvas: React.FC = () => {
resetEth()
setDidErrorOcurr(false)
setDirty(false)
sketch.current && sketch.current.clear()
setBackground(DEFAULT_BACKGROUND)
if (sketch.current) {
sketch.current.fromJSON({
...sketch.current.toJSON(),
objects: [],
background: DEFAULT_BACKGROUND,
})
}
localStorage.removeItem(LOCAL_STORAGE_KEY)
}, [resetIpfs, resetEth, sketch])

Expand Down

0 comments on commit e9d401b

Please sign in to comment.