diff --git a/app/resources/js/components/annotator/canvas/annotations.js b/app/resources/js/components/annotator/canvas/annotations.js index 5ed2dd3..7ea4c3f 100644 --- a/app/resources/js/components/annotator/canvas/annotations.js +++ b/app/resources/js/components/annotator/canvas/annotations.js @@ -357,7 +357,7 @@ export function createAnnotationView(annotation, type) { // Find annotation and make it active if (!this.camera_move && (this.canvasIsToolActive(this.scale_move_tool) || this.canvasIsToolActive(this.join_rows_tool)) && !this.left_control_active && !this.left_alt_active) activateAnnotation(type); - } + }; let self = this; function activateAnnotation(type) { diff --git a/app/resources/js/components/annotator/canvas/polygon_tool.js b/app/resources/js/components/annotator/canvas/polygon_tool.js index d5620d6..49c5aeb 100644 --- a/app/resources/js/components/annotator/canvas/polygon_tool.js +++ b/app/resources/js/components/annotator/canvas/polygon_tool.js @@ -55,7 +55,7 @@ export function createPolygonTool(annotator_component) { polygon.path = new paper.Path(); polygon.path.closed = true; polygon.path.strokeColor = 'rgb(34 43 68)'; - polygon.path.fillColor = 'rgba(75,202,172, 0.1)' + polygon.path.fillColor = 'rgba(75,202,172, 0.1)'; polygon.path.strokeWidth = 1; polygon.path.selected = true; console.log('created'); diff --git a/app/resources/js/components/annotator/canvas/scale_move_tool_canvas_events.js b/app/resources/js/components/annotator/canvas/scale_move_tool_canvas_events.js index 36421ee..0eb0f60 100644 --- a/app/resources/js/components/annotator/canvas/scale_move_tool_canvas_events.js +++ b/app/resources/js/components/annotator/canvas/scale_move_tool_canvas_events.js @@ -215,7 +215,7 @@ export function canvasMouseDownEv(event) { let canvasMousePosition = new paper.Point(event.offsetX, event.offsetY); let viewPosition = this.scope.view.viewToProject(canvasMousePosition); - let checks = [] + let checks = []; if (this.active_region && this.left_alt_active) checks.push({path: this.active_region.view.path, segm_type: 'region_path'}); else if (this.active_row && this.left_control_active) { diff --git a/app/static/js/arabic_reshaper.js b/app/static/js/arabic_reshaper.js index fa36fff..13ebedb 100644 --- a/app/static/js/arabic_reshaper.js +++ b/app/static/js/arabic_reshaper.js @@ -91,7 +91,7 @@ class ArabicReshaper this.forward_mapping['ۓ'] = ['ﮰ', '', '', 'ﮱ']; this.forward_mapping['‍'] = ['‍', '‍', '‍', '‍']; - this.backward_mapping = {} + this.backward_mapping = {}; for (let letter in this.forward_mapping) { for (let letter_option of this.forward_mapping[letter]) @@ -227,7 +227,7 @@ class ArabicReshaper { if (seq['chars'].length > 0) { - let arabic_seq = [] + let arabic_seq = []; let number_of_ending_spaces = 0; for (let i of seq['chars'].slice().reverse()) { @@ -267,7 +267,7 @@ class ArabicReshaper if (seq['chars'].length > 0) { - let arabic_seq = [] + let arabic_seq = []; let number_of_ending_spaces = 0; for (let i of seq['chars'].slice().reverse()) { diff --git a/app/static/js/image_list.js b/app/static/js/image_list.js index d543e95..33f5ffb 100644 --- a/app/static/js/image_list.js +++ b/app/static/js/image_list.js @@ -3,7 +3,7 @@ class ImageList { constructor(objects_to_change, page_name = 'show_results') { - this.page_name = page_name + this.page_name = page_name; this.objects_to_change = objects_to_change; this.images = $('.scrolling-wrapper .figure'); @@ -73,7 +73,7 @@ class ImageList for (let o of this.objects_to_change) { - o.change_image(this.image_id, this.change_url.bind(this), this.line_id) + o.change_image(this.image_id, this.change_url.bind(this), this.line_id); } window.localStorage.setItem('last_opened_page_'+this.document_id, this.image_index); } diff --git a/app/static/js/layout/layout_editor.js b/app/static/js/layout/layout_editor.js index 057516f..976852a 100644 --- a/app/static/js/layout/layout_editor.js +++ b/app/static/js/layout/layout_editor.js @@ -133,7 +133,7 @@ class LayoutEditor{ this.previous_object[this.previous_object.length-1].order = object.order; } this.last_action = "reorder_objects"; - this.redraw_order() + this.redraw_order(); } make_append(object){ @@ -536,7 +536,7 @@ class LayoutEditor{ ignore: obj.ignore, deleted: obj.deleted, order: obj.order - } + }; } } console.log(obj_to_send); diff --git a/app/static/js/lazy_image.js b/app/static/js/lazy_image.js index 216f076..9cefa6d 100644 --- a/app/static/js/lazy_image.js +++ b/app/static/js/lazy_image.js @@ -36,7 +36,7 @@ async function add_lazy(element, imageObserver){ } } } else { - global_lazy_list.push(element) + global_lazy_list.push(element); } } diff --git a/app/static/js/ocr/keyboard.js b/app/static/js/ocr/keyboard.js index 3924e89..7966374 100644 --- a/app/static/js/ocr/keyboard.js +++ b/app/static/js/ocr/keyboard.js @@ -8,7 +8,7 @@ class Keyboard{ for (let btn of this.keyboard_btn) { btn.addEventListener('click', this.toogle.bind(this)); - btn.addEventListener('mousedown', this.prevent_focus.bind(this)) + btn.addEventListener('mousedown', this.prevent_focus.bind(this)); } this.selected_layout = "default"; this.layout_select = document.getElementById('layout-select'); @@ -186,4 +186,4 @@ function getCookie(cname) function capitalize_first_letter(string) { return string.charAt(0).toUpperCase() + string.slice(1); -} \ No newline at end of file +} diff --git a/app/static/js/ocr/text_line.js b/app/static/js/ocr/text_line.js index e8e98d6..4248c57 100644 --- a/app/static/js/ocr/text_line.js +++ b/app/static/js/ocr/text_line.js @@ -33,7 +33,7 @@ class TextLine for(var c of this.confidences){ this.line_confidence += (1 - c) ** power_const; } - this.line_confidence = 1 - (this.line_confidence / this.confidences.length) ** (1.0/power_const) + this.line_confidence = 1 - (this.line_confidence / this.confidences.length) ** (1.0/power_const); } else { this.line_confidence = 1; } @@ -186,7 +186,7 @@ class TextLine } */ } - let span_text = "" + let span_text = ""; for (let letter_index of span_letter_indexes['indexes']) { let char = visual_text.charAt(letter_index); @@ -224,7 +224,7 @@ class TextLine rgb = rgb.substring(4, rgb.length-1).replace(/ /g, '').split(','); color = parseInt(rgb[1]); } - let span_letter_indexes = {'indexes':[], 'color': color} + let span_letter_indexes = {'indexes':[], 'color': color}; if ($(span).hasClass('user-input')) { span_letter_indexes['user_input'] = true; @@ -256,7 +256,7 @@ class TextLine let inside_ligature = false; let caret_in_span = false; let caret_offset = 0; - let new_span_letter_indexes = {'indexes':[], 'color': 255} + let new_span_letter_indexes = {'indexes':[], 'color': 255}; for (let span_letter_indexes of current_letter_indexes_to_spans_mapping) { if ('user_input' in span_letter_indexes) diff --git a/app/static/js/ocr/text_line_new.js b/app/static/js/ocr/text_line_new.js index 2e09a65..1ec366e 100644 --- a/app/static/js/ocr/text_line_new.js +++ b/app/static/js/ocr/text_line_new.js @@ -32,7 +32,7 @@ class TextLine for(var c of this.confidences){ this.line_confidence += (1 - c) ** power_const; } - this.line_confidence = 1 - (this.line_confidence / this.confidences.length) ** (1.0/power_const) + this.line_confidence = 1 - (this.line_confidence / this.confidences.length) ** (1.0/power_const); } else { this.line_confidence = 1; } @@ -183,7 +183,7 @@ class TextLine } */ } - let span_text = "" + let span_text = ""; for (let letter_index of span_letter_indexes['indexes']) { let char = visual_text.charAt(letter_index); @@ -221,7 +221,7 @@ class TextLine rgb = rgb.substring(4, rgb.length-1).replace(/ /g, '').split(','); color = parseInt(rgb[1]); } - let span_letter_indexes = {'indexes':[], 'color': color} + let span_letter_indexes = {'indexes':[], 'color': color}; if ($(span).hasClass('user-input')) { span_letter_indexes['user_input'] = true; @@ -253,7 +253,7 @@ class TextLine let inside_ligature = false; let caret_in_span = false; let caret_offset = 0; - let new_span_letter_indexes = {'indexes':[], 'color': 255} + let new_span_letter_indexes = {'indexes':[], 'color': 255}; for (let span_letter_indexes of current_letter_indexes_to_spans_mapping) { if ('user_input' in span_letter_indexes) diff --git a/app/static/js/ocr/text_lines_editor.js b/app/static/js/ocr/text_lines_editor.js index 20ee451..27402a1 100644 --- a/app/static/js/ocr/text_lines_editor.js +++ b/app/static/js/ocr/text_lines_editor.js @@ -531,7 +531,7 @@ class TextLinesEditor { {animate: true, duration: 0.5}); this.active_line = line; line.focus = true; - this.set_line_style(line) + this.set_line_style(line); this.swap_delete_line_button_blueprint(); this.swap_ignore_line_button_blueprint(); @@ -574,7 +574,7 @@ class TextLinesEditor { let container_x_pad = 25; let view_port_x_pad = (container_x_pad / container.width()) * view_port_width; - let new_focus = current_focus + let new_focus = current_focus; // center focus according to caret position if ((image_caret_position > current_focus + half_view_port_width - offset) || (image_caret_position < current_focus - half_view_port_width + offset)) @@ -781,7 +781,7 @@ function get_focus_line_points(line) { start_x -= left_pad; end_x -= line_width - new_line_width + left_pad; } - let view_port_container_height = (line_height * container_height) / show_line_height + let view_port_container_height = (line_height * container_height) / show_line_height; let bottom_pad = (line_height * show_bottom_pad) / show_line_height; let y = end_y - view_port_container_height / 2 + bottom_pad; return [start_x, end_x, y]; diff --git a/app/static/leaflet/Leaflet.Editable.js b/app/static/leaflet/Leaflet.Editable.js index c41b496..251509a 100644 --- a/app/static/leaflet/Leaflet.Editable.js +++ b/app/static/leaflet/Leaflet.Editable.js @@ -1941,6 +1941,6 @@ latlng = L.latLng(latlng); this.lat = latlng.lat; this.lng = latlng.lng; - } + }; }, window));