Skip to content

Commit

Permalink
feat: prevent tool reset if selected tool is hand-draw
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes committed Feb 23, 2023
1 parent 955129d commit 1c65baf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion folio-board/hooks/useEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@ export const useEvents = callbacks => {
elements: board.elements,
});
board.activeElement = null;
board.activeTool = null; // reset active tool
// Check if the tool is not the handdraw
// TODO: we need also to check if lock is enabled
if (board.activeTool !== ELEMENTS.DRAW) {
board.activeTool = null;
}
// Terrible hack to enable editing in a text element
if (element.type === ELEMENTS.TEXT) {
element.editing = true;
Expand Down

0 comments on commit 1c65baf

Please sign in to comment.