Skip to content

Commit

Permalink
still works when option is off
Browse files Browse the repository at this point in the history
  • Loading branch information
c298lee committed Feb 3, 2025
1 parent 5ba5800 commit ff07b6c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/feedback/src/screenshot/components/ScreenshotEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function ScreenshotEditorFactory({
const [croppingRect, setCroppingRect] = hooks.useState<Box>({ startX: 0, startY: 0, endX: 0, endY: 0 });
const [confirmCrop, setConfirmCrop] = hooks.useState(false);
const [isResizing, setIsResizing] = hooks.useState(false);
const [isCropping, setIsCropping] = hooks.useState(false);
const [isCropping, setIsCropping] = hooks.useState(true);
const [isAnnotating, setIsAnnotating] = hooks.useState(false);

hooks.useEffect(() => {
Expand Down Expand Up @@ -491,24 +491,24 @@ export function ScreenshotEditorFactory({
<div />
<div class="editor__tool-bar">
<button
class={`editor__tool ${isAnnotating ? 'editor__tool--active' : ''}`}
class={`editor__tool ${isCropping ? 'editor__tool--active' : ''}`}
onClick={e => {
e.preventDefault();
setIsAnnotating(!isAnnotating);
setIsCropping(false);
setIsCropping(!isCropping);
setIsAnnotating(false);
}}
>
<PenIcon />
<CropIcon />
</button>
<button
class={`editor__tool ${isCropping ? 'editor__tool--active' : ''}`}
class={`editor__tool ${isAnnotating ? 'editor__tool--active' : ''}`}
onClick={e => {
e.preventDefault();
setIsCropping(!isCropping);
setIsAnnotating(false);
setIsAnnotating(!isAnnotating);
setIsCropping(false);
}}
>
<CropIcon />
<PenIcon />
</button>
</div>
<div />
Expand Down

0 comments on commit ff07b6c

Please sign in to comment.