Mercurial > hg > digilib-old
comparison webapp/src/main/webapp/jquery/jquery.digilib.annotator.js @ 1150:d9d17eb3d731
shoAnnotationNumbers controls now also numbers on mark-annotations.
author | robcast |
---|---|
date | Mon, 26 Nov 2012 16:44:57 +0100 |
parents | 05413c47a976 |
children | 13be1a009bbc |
comparison
equal
deleted
inserted
replaced
1149:05f7eb1ba0a2 | 1150:d9d17eb3d731 |
---|---|
244 if (!data.settings.isAnnotationsVisible) return; | 244 if (!data.settings.isAnnotationsVisible) return; |
245 var cssPrefix = data.settings.cssPrefix; | 245 var cssPrefix = data.settings.cssPrefix; |
246 var $elem = data.$elem; | 246 var $elem = data.$elem; |
247 var annotator = data.annotator; | 247 var annotator = data.annotator; |
248 var annotation = annot.annotation; | 248 var annotation = annot.annotation; |
249 var idx = annot.idx ? annot.idx : '?'; | 249 var idx = ''; |
250 if (data.settings.showAnnotationNumbers) { | |
251 // show annotation number | |
252 idx = annot.idx ? annot.idx : '?'; | |
253 } | |
250 var area = null; | 254 var area = null; |
251 var type = null; | 255 var type = null; |
252 if (annotation.shapes != null) { | 256 if (annotation.shapes != null) { |
253 // annotation shape | 257 // annotation shape |
254 var shape = annotation.shapes[0]; | 258 var shape = annotation.shapes[0]; |
278 if (type === 'rectangle') { | 282 if (type === 'rectangle') { |
279 // render rectangle | 283 // render rectangle |
280 var clippedArea = data.zoomArea.intersect(area); | 284 var clippedArea = data.zoomArea.intersect(area); |
281 if (clippedArea == null) return; | 285 if (clippedArea == null) return; |
282 screenRect = data.imgTrafo.transform(clippedArea); | 286 screenRect = data.imgTrafo.transform(clippedArea); |
283 if (!data.settings.showAnnotationNumbers) { | |
284 // suppress annotation number | |
285 idx = ''; | |
286 } | |
287 $annotation = $('<div class="'+cssPrefix+'annotationregion '+cssPrefix+'overlay annotator-hl">'+idx+'</div>'); | 287 $annotation = $('<div class="'+cssPrefix+'annotationregion '+cssPrefix+'overlay annotator-hl">'+idx+'</div>'); |
288 } else { | 288 } else { |
289 // render point | 289 // render point |
290 if (!data.zoomArea.containsPosition(area)) return; | 290 if (!data.zoomArea.containsPosition(area)) return; |
291 var screenRect = data.imgTrafo.transform(area); | 291 var screenRect = data.imgTrafo.transform(area); |