Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 9f7d62a

Browse files
authored
fix: DEV-1784: Fix drawing hanging when region is tiny (#516)
* fix: DEV-1784: Fix drawing hanging when region is smaller than minimum size * fix: DEV-1784: Fix errors in console while working with labels list with ocr
1 parent e50c333 commit 9f7d62a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/Entities/RegionItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const RegionItemDesc = observer(({ item, setDraggable }) => {
2727
const controls = item.perRegionDescControls || [];
2828

2929
return (
30-
<Elem name="desc" tag="div" mod={{ collapsed, empty: !(controls?.length > 0) }} onMouseEnter={()=>{setDraggable(false);}} onMouseLeave={()=>{setDraggable(true);}}>
30+
<Elem name="desc" tag="div" mod={{ collapsed, empty: !(controls?.length > 0) }} onMouseEnter={()=>{setDraggable?.(false);}} onMouseLeave={()=>{setDraggable?.(true);}}>
3131
<Elem name="controls">
3232
{controls.map((tag, idx) => {
3333
const View = Registry.getPerRegionView(tag.type, PER_REGION_MODES.REGION_LIST);

src/mixins/DrawingTool.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ const DrawingTool = types
158158
if (!self.beforeCommitDrawing()) {
159159
self.deleteRegion();
160160
if (self.control.type === self.tagTypes.stateTypes) self.annotation.unselectAll(true);
161+
self._resetState();
161162
} else {
162163
self._finishDrawing();
163164
}

0 commit comments

Comments
 (0)