diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2014-07-29 18:50:09 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2014-07-29 18:50:09 -0400 |
| commit | 2ab5da4bfdce9f41e93a27082900da6ea72db6ed (patch) | |
| tree | bdbe27d77fea5f77e0b6a8934ab01391f03a8057 /web/static/js | |
| parent | dfcd65c8f10aa94f19fe40940565681ab9a73e44 (diff) | |
| download | ocr-layer-curation-2ab5da4bfdce9f41e93a27082900da6ea72db6ed.tar.gz | |
Webapp now show three columns
image, original text and corrected text. The highlighting is functional
as well.
Diffstat (limited to 'web/static/js')
| -rw-r--r-- | web/static/js/main.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/web/static/js/main.js b/web/static/js/main.js index ff09fd1..2adf3ea 100644 --- a/web/static/js/main.js +++ b/web/static/js/main.js @@ -1,19 +1,21 @@ $(document).ready(function() { $('#page').mapster({ - mapKey: 'data-id', - fillColor: 'ff0000', - fillOpacity: 0.3, - onMouseover: function (e) { - $("#" + e.key).addClass("selected"); - }, - onMouseout: function (e) { - $("#" + e.key).removeClass("selected"); - } - + mapKey: 'data-id', + fillColor: 'ff0000', + fillOpacity: 0.3, + onMouseover: function (e) { + $("#" + "orig-" + e.key).addClass("selected"); + $("#" + "corr-" + e.key).addClass("selected"); + }, + onMouseout: function (e) { + $("#" + "orig-" + e.key).removeClass("selected"); + $("#" + "corr-" + e.key).removeClass("selected"); + } + }).mapster('resize', 500); $("span").mouseenter(function() { - $('area[data-id='+$(this).attr("id")+']').mapster("highlight"); + $('area[data-id='+$(this).attr("id").replace(/\D+/,"")+']').mapster("highlight"); }); $("span").mouseout(function() { |
