From 064b9b53b28013af0e04b6b88ee20974098f2b7c Mon Sep 17 00:00:00 2001 From: psjostrom Date: Thu, 19 Nov 2020 09:17:39 +0100 Subject: [PATCH] SDA-2533 Add clear, erase and done functionality. Further optimizations of logic. --- spec/__snapshots__/annotateArea.spec.tsx.snap | 2 +- ...pec.ts.snap => snippingTool.spec.tsx.snap} | 39 +++---- spec/annotateArea.spec.tsx | 30 +++++- spec/snippingTool.spec.ts | 32 ------ spec/snippingTool.spec.tsx | 67 ++++++++++++ src/app/screen-snippet-handler.ts | 43 ++++---- src/renderer/components/annotate-area.tsx | 56 ++++++---- src/renderer/components/color-picker-pill.tsx | 4 +- src/renderer/components/snipping-tool.tsx | 102 +++++++++++++----- 9 files changed, 257 insertions(+), 118 deletions(-) rename spec/__snapshots__/{snippingTool.spec.ts.snap => snippingTool.spec.tsx.snap} (76%) delete mode 100644 spec/snippingTool.spec.ts create mode 100644 spec/snippingTool.spec.tsx diff --git a/spec/__snapshots__/annotateArea.spec.tsx.snap b/spec/__snapshots__/annotateArea.spec.tsx.snap index 34569a1c..814daee2 100644 --- a/spec/__snapshots__/annotateArea.spec.tsx.snap +++ b/spec/__snapshots__/annotateArea.spec.tsx.snap @@ -4,7 +4,7 @@ exports[` should render correctly 1`] = ` -
-
- + -
+ } + onChange={[Function]} + paths={Array []} + penColor="rgba(0, 142, 255, 1)" + screenSnippetPath="Screen-Snippet" + />