aboutsummaryrefslogtreecommitdiffstats
path: root/web/static/js
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2014-08-03 21:19:55 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2014-08-03 21:19:55 -0400
commit6283b6582960544dc02e438e739775e3239b802c (patch)
tree70538744d32a55757e0a5c7c6d581fc404ab6878 /web/static/js
parent102a573a7e6fd711da874c76f74b47df37ff124e (diff)
downloadocr-layer-curation-6283b6582960544dc02e438e739775e3239b802c.tar.gz
better 2-way highlighting, still not perfect
Diffstat (limited to 'web/static/js')
-rw-r--r--web/static/js/main.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/static/js/main.js b/web/static/js/main.js
index 2adf3ea..c790e34 100644
--- a/web/static/js/main.js
+++ b/web/static/js/main.js
@@ -1,6 +1,6 @@
$(document).ready(function() {
$('#page').mapster({
- mapKey: 'data-id',
+ mapKey: 'data-orig',
fillColor: 'ff0000',
fillOpacity: 0.3,
onMouseover: function (e) {
@@ -15,7 +15,9 @@ $(document).ready(function() {
}).mapster('resize', 500);
$("span").mouseenter(function() {
- $('area[data-id='+$(this).attr("id").replace(/\D+/,"")+']').mapster("highlight");
+ $(this).attr("id").replace(/\D+/,"").split(",").map(function(e){
+ $('area[data-orig='+e+']').mapster("highlight");
+ })
});
$("span").mouseout(function() {