Skip to content

Commit

Permalink
fix: Merge pull request #434 from UniversalDataTool/fix/426
Browse files Browse the repository at this point in the history
By Default Regions can't be drawn beyond image width/height
  • Loading branch information
seveibar authored Jan 28, 2021
2 parents f06a5d8 + 7204816 commit d7d6f2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ cypress/snapshots

.idea
*.db
.vercel
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 d7d6f2b

Please sign in to comment.