From eebeada55d2b337b1641a4fcb7697df56a028672 Mon Sep 17 00:00:00 2001 From: Kai Labusch Date: Wed, 6 Nov 2019 10:44:18 +0100 Subject: [PATCH] enlarge image part --- ner-edith.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ner-edith.js b/ner-edith.js index 21ad119..84070b5 100644 --- a/ner-edith.js +++ b/ner-edith.js @@ -23,8 +23,6 @@ function loadFile(evt, onComplete) { if (tmp == null) continue; - //console.log(tmp); - if (urls == null) { urls = tmp; } @@ -65,6 +63,11 @@ function setupInterface(data, file, urls) { let top = data.data[nRow]['top']; let bottom = data.data[nRow]['bottom']; + top = Math.max(0, top - 25); + bottom = bottom + 25; + left = Math.max(0, left - 50); + right = right + 50; + let width = right - left; let height = bottom - top; @@ -75,7 +78,7 @@ function setupInterface(data, file, urls) { img_url = img_url.replace('width', width.toString()); img_url = img_url.replace('height', height.toString()); - console.log(img_url); + //console.log(img_url); if (img_url == "http://empty") return @@ -366,7 +369,7 @@ function setupInterface(data, file, urls) { $(".offset").on('click', gotoLocation); - updatePreview(startIndex) + //updatePreview(startIndex) if ($("#docpos").val() != startIndex) {