|
|
|
@ -121,7 +121,7 @@ class CocoCanvas {
@@ -121,7 +121,7 @@ class CocoCanvas {
|
|
|
|
|
}.bind(this)); |
|
|
|
|
} |
|
|
|
|
loadNav() { |
|
|
|
|
let r = new Request('/categories.json'); |
|
|
|
|
let r = new Request('categories.json'); |
|
|
|
|
fetch(r) |
|
|
|
|
.then(response => response.json()) |
|
|
|
|
.then(categories => { |
|
|
|
@ -183,7 +183,7 @@ class CocoCanvas {
@@ -183,7 +183,7 @@ class CocoCanvas {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
requestAnnotation(category_id) { |
|
|
|
|
let r = new Request(`/annotation.json?category=${category_id}&normalise=100`); |
|
|
|
|
let r = new Request(`annotation.json?category=${category_id}&normalise=100`); |
|
|
|
|
return fetch(r) |
|
|
|
|
.then(response => response.json()) |
|
|
|
|
.then(annotation => { |
|
|
|
@ -352,7 +352,7 @@ class CocoCanvas {
@@ -352,7 +352,7 @@ class CocoCanvas {
|
|
|
|
|
'scene': this.sceneSelectEl.value, |
|
|
|
|
'annotations': annotations |
|
|
|
|
}); |
|
|
|
|
let r = new Request('/save', {'method': 'POST', 'body': data}); |
|
|
|
|
let r = new Request('save', {'method': 'POST', 'body': data}); |
|
|
|
|
fetch(r) |
|
|
|
|
.then(response => response.json()) |
|
|
|
|
.then(submission => { |
|
|
|
|