Skip to content

Commit

Permalink
clear before redraw
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenist committed Dec 31, 2023
1 parent bc63fbd commit cf0cce5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/drawing-engine/src/engine/CanvasHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export class CanvasHistory {

const { actions: filteredActions, hasClear } = CanvasHistory.getActionsSinceClear(actions)

this.engine._clear()
if (!hasClear && blobId) {
const blob = await this.db.blobs.get(blobId)
await this.drawBlob(blob)
Expand Down Expand Up @@ -268,6 +269,7 @@ export class CanvasHistory {
throw new Error(`Tool ${action.tool} not found`)
}
tool.drawFromHistory(action.path, action.options)
this.engine.commitToSavedLayer()
}
}

Expand Down

0 comments on commit cf0cce5

Please sign in to comment.