Skip to content

Commit 7204816

Browse files
committed
by default regions can't be drawn over the edge of an image, fixes #426
fixes #143
1 parent 0b31e06 commit 7204816

File tree

1 file changed

+2
-1
lines changed
  • src/components/ImageSegmentation

1 file changed

+2
-1
lines changed

src/components/ImageSegmentation/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ export default ({
118118
)
119119

120120
const allowedArea = useMemo(() => {
121-
if (!iface.allowedArea && !sample?.allowedArea) return undefined
121+
if (!iface.allowedArea && !sample?.allowedArea)
122+
return { x: 0, y: 0, w: 1, h: 1 }
122123
const { x, y, width: w, height: h } =
123124
sample?.allowedArea || iface?.allowedArea
124125
return { x, y, w, h }

0 commit comments

Comments
 (0)