Skip to content

Commit

Permalink
by default regions can't be drawn over the edge of an image, fixes #426
Browse files Browse the repository at this point in the history
fixes #143
  • Loading branch information
seveibar committed Jan 18, 2021
1 parent 0b31e06 commit 7204816
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ImageSegmentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ export default ({
)

const allowedArea = useMemo(() => {
if (!iface.allowedArea && !sample?.allowedArea) return undefined
if (!iface.allowedArea && !sample?.allowedArea)
return { x: 0, y: 0, w: 1, h: 1 }
const { x, y, width: w, height: h } =
sample?.allowedArea || iface?.allowedArea
return { x, y, w, h }
Expand Down

0 comments on commit 7204816

Please sign in to comment.