Skip to content

Commit

Permalink
verification: minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Dec 9, 2020
1 parent 55585e0 commit 2936063
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function calculateImageScale() {
'src', '/images/image/' + imageId + '/');
}

/**
/**
* Preload next and previous images to cache.
*/
function preloadImages() {
Expand Down Expand Up @@ -239,9 +239,7 @@ function calculateImageScale() {
}
if (annotation.vector === null) {
link.text("not in image")
}
else
{
} else {
let annotation_text_array = [];
for (let i = 1; i <= Object.keys(annotation.vector).length / 2; i++) {
annotation_text_array.push("'x" + i + "': " + annotation.vector["x" + i] +
Expand All @@ -256,8 +254,7 @@ function calculateImageScale() {
link.data('annotationid', annotation.id);
link.click(function(event) {
event.preventDefault();
gAnnotationId = $(this).data('annotationid');
loadAnnotationView(gAnnotationId);
loadAnnotationView($(this).data('annotationid'));
});

result.append(link);
Expand Down Expand Up @@ -339,7 +336,7 @@ function calculateImageScale() {
/**
* Load the annotation view for another image.
*
* @param imageId
* @param annotationId
* @param fromHistory
*/
function loadAnnotationView(annotationId, fromHistory) {
Expand Down Expand Up @@ -422,7 +419,7 @@ function calculateImageScale() {
// image is loaded
let annotation = annotations[0];
if (!tool || tool.annotationTypeId !== annotation.annotation_type.id ||
(tool.vector_type === 5 && tool.node_count !== annotation.annotation_type.node_count)) {
(tool.vector_type === 5 && tool.node_count !== annotation.annotation_type.node_count)) {
switch (annotation.annotation_type.vector_type) {
case 1: // Boundingbox
tool = new BoundingBoxes(annotation.annotation_type.id, true);
Expand All @@ -434,7 +431,7 @@ function calculateImageScale() {
case 5: // Polygon
$('#image_canvas').removeClass('hidden').attr('width', $('#image').width()).attr('height', $('#image').height());
tool = new Canvas($('#image_canvas'), annotation.annotation_type.vector_type,
annotation.annotation_type.node_count, annotation.annotation_type.id);
annotation.annotation_type.node_count, annotation.annotation_type.id);
break;
}
}
Expand All @@ -447,8 +444,7 @@ function calculateImageScale() {
} else {
color = '#F0AD4E';
}
}
else if (annotation.blurred) {
} else if (annotation.blurred) {
color = '#5BC0DE'
}
if (annotation.id !== current) {
Expand Down

0 comments on commit 2936063

Please sign in to comment.