Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ All notable changes to this project will be documented here.

Nothing yet.

## [0.16.4] - May 2nd, 2025
- Fix bug where empty polygon layers could be included in a `submit_button` hook payload.

## [0.16.3] - Apr 25th, 2025
- Fix bug where the `Vanish` button wouldn't update its `locked` state when switching between subtasks.
- Fix bug where clicking the `Vanish` button would unexpectedly set the size cookie, causing future annotations in the same subtask to be loaded in a very small size on subsequent sessions, with the only way to recover being to increase the annotation size.
Expand Down
3 changes: 2 additions & 1 deletion demo/resume-from.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
467.5,
267.5
]
]
],
[]
],
"classification_payloads": [
{
Expand Down
2 changes: 1 addition & 1 deletion dist/ulabel.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ulabel.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ulabel",
"description": "An image annotation tool.",
"version": "0.16.3",
"version": "0.16.4",
"main": "dist/ulabel.js",
"module": "dist/ulabel.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/annotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class ULabelAnnotation {
const layer = this.spatial_payload[i];
// Ensure that the layer is an array
if (!Array.isArray(layer[0])) {
console.log(`Layer ${i} points of id ${this.id} are not arrays. Removing layer.`);
console.log(`Layer ${i} of id ${this.id} has an invalid or empty point array. Removing layer.`);
indices_to_remove.push(i);
continue;
}
Expand Down
9 changes: 8 additions & 1 deletion src/toolbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2484,8 +2484,15 @@ export class SubmitButtons extends ToolboxItem {
submit_payload["annotations"][stkey] = [];

// Add all of the annotations in that subtask
let annotation: ULabelAnnotation;
for (let i = 0; i < ulabel.subtasks[stkey]["annotations"]["ordering"].length; i++) {
const annotation = ulabel.subtasks[stkey]["annotations"]["access"][ulabel.subtasks[stkey]["annotations"]["ordering"][i]];
try {
annotation = ULabelAnnotation.from_json(ulabel.subtasks[stkey]["annotations"]["access"][ulabel.subtasks[stkey]["annotations"]["ordering"][i]]);
} catch (e) {
console.error("Error validating annotation during submit.", e);
continue;
}
Comment on lines +2489 to +2494
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we ensure that the annotations being delivered are still valid ULabelAnnotation objects

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, although that line certainly make me want to write some annotation getters...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Covered in #198)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never ran into any errors with the loader but just to be safe i figured id add it


// Skip any delete modes
if (
DELETE_MODES.includes(annotation.spatial_type)
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const ULABEL_VERSION = "0.16.3";
export const ULABEL_VERSION = "0.16.4";