From 06501c93407a7a0d1222480d958905df6b7392f5 Mon Sep 17 00:00:00 2001 From: Kai Labusch Date: Wed, 11 Dec 2019 07:59:49 +0100 Subject: [PATCH] implement issue #32 --- neath.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/neath.js b/neath.js index 8bb0cf9..5474fa5 100644 --- a/neath.js +++ b/neath.js @@ -164,19 +164,6 @@ function setupInterface(data, file, urls) { $("#preview-link").attr("href", img_url); } - function gotoLocation(evt) { - - if (urls == null) return; - - // let nRow = parseInt($(evt.target).text()); - - let tableInfo = $(evt.target).data('tableInfo'); - - let nRow = tableInfo.nRow; - - updatePreview(nRow) - } - function colorCode() { $("#table td:contains('B-PER')").addClass('ner_per'); $("#table td:contains('I-PER')").addClass('ner_per'); @@ -196,6 +183,18 @@ function setupInterface(data, file, urls) { let editingTd; + function gotoLocation(evt) { + + if (urls == null) return; + if (editingTd != null) return; + + let tableInfo = $(evt.target).data('tableInfo'); + + let nRow = tableInfo.nRow; + + updatePreview(nRow) + } + function makeTdEditable(td) { editingTd = {