Skip to content

Commit d7d6f2b

Browse files
authored
fix: Merge pull request #434 from UniversalDataTool/fix/426
By Default Regions can't be drawn beyond image width/height
2 parents f06a5d8 + 7204816 commit d7d6f2b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ cypress/snapshots
4343

4444
.idea
4545
*.db
46+
.vercel

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)