Skip to content

Commit c2e54f2

Browse files
Update demo
1 parent c62f946 commit c2e54f2

1 file changed

Lines changed: 11 additions & 31 deletions

File tree

demo/multi-class.html

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
}
8181
};
8282

83+
const AllowedToolboxItem = ULabel.get_allowed_toolbox_item_enum();
8384
// Initial ULabel configuration
8485
let ulabel = new ULabel({
8586
"container_id": "container",
@@ -106,26 +107,6 @@
106107
"color": "green",
107108
"row_number": 1,
108109
},
109-
// {
110-
// "name": "Submit",
111-
// "hook": on_submit,
112-
// "size_factor": 0.9,
113-
// "row_number": 2,
114-
// },
115-
// {
116-
// "name": "Reject",
117-
// "hook": () => { console.log("Reject"); },
118-
// "size_factor": 0.9,
119-
// "color": "red",
120-
// "row_number": 2,
121-
// },
122-
// {
123-
// "name": "Approve",
124-
// "hook": () => { console.log("Approve"); },
125-
// "size_factor": 0.9,
126-
// "color": "green",
127-
// "row_number": 2,
128-
// },
129110
{
130111
"name": "Skip",
131112
"hook": () => { console.log("Skip"); },
@@ -136,17 +117,16 @@
136117
],
137118
"subtasks": subtasks,
138119
"initial_line_size": 2,
139-
"default_toolbox_item_order": [
140-
7, // SubmitButtons
141-
0, // ModeSelect
142-
// 1, // ZoomPan
143-
2, // AnnotationResize
144-
3, // AnnotationID
145-
4, // Recolor Active
146-
5, // ClassCounter
147-
6, // KeypointSlider
148-
8, // FilterDistance
149-
// 9, // Brush
120+
"toolbox_order": [
121+
AllowedToolboxItem.SubmitButtons,
122+
AllowedToolboxItem.ModeSelect,
123+
AllowedToolboxItem.ZoomPan,
124+
AllowedToolboxItem.AnnotationID,
125+
AllowedToolboxItem.ClassCounter,
126+
AllowedToolboxItem.AnnotationResize,
127+
AllowedToolboxItem.KeypointSlider,
128+
AllowedToolboxItem.FilterDistance,
129+
AllowedToolboxItem.RecolorActive,
150130
],
151131
"toggle_brush_mode_keybind": "f",
152132
"create_bbox_on_initial_crop": "|",

0 commit comments

Comments
 (0)