Skip to content

Commit

Permalink
Merge pull request #1 from LdDl/changes
Browse files Browse the repository at this point in the history
Changes
  • Loading branch information
LdDl authored Apr 29, 2023
2 parents 41a27e2 + 7716056 commit 813c06e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ybat.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
alert("Restore function is not supported. If you need it, use Chrome or Firefox instead.")
}

// Prevent accidental reloading
window.onbeforeunload = function(){
return 'Are you sure you want to leave the page?';
};

// Start everything
document.onreadystatechange = () => {
if (document.readyState === "complete") {
Expand Down Expand Up @@ -1148,12 +1153,12 @@
for (let i = 0; i < bboxes[imageName][className].length; i++) {
const bbox = bboxes[imageName][className][i]

const segmentation = [
const segmentation = [[
bbox.x, bbox.y,
bbox.x, bbox.y + bbox.height,
bbox.x + bbox.width, bbox.y + bbox.height,
bbox.x + bbox.width, bbox.y
]
]]

result.annotations.push({
segmentation: segmentation,
Expand Down

0 comments on commit 813c06e

Please sign in to comment.