1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 23:28:06 +02:00

Splits shared/annotation.js into core/ and display/

This commit is contained in:
Yury Delendik 2014-06-17 17:43:33 -05:00
parent df87df59b6
commit bdeca30fbf
12 changed files with 284 additions and 318 deletions

View file

@ -17,7 +17,7 @@
/* globals RenderingStates, PDFView, PDFHistory, PDFFindBar, PDFJS, mozL10n,
CustomStyle, PresentationMode, scrollIntoView, SCROLLBAR_PADDING,
CSS_UNITS, UNKNOWN_SCALE, DEFAULT_SCALE, getOutputScale,
TextLayerBuilder, cache, Stats */
TextLayerBuilder, cache, Stats, AnnotationUtils */
'use strict';
@ -322,16 +322,14 @@ var PageView = function pageView(container, id, scale,
} else {
for (i = 0, ii = annotationsData.length; i < ii; i++) {
data = annotationsData[i];
var annotation = PDFJS.Annotation.fromData(data);
if (!annotation || !annotation.hasHtml()) {
if (!data || !data.hasHtml) {
continue;
}
element = annotation.getHtmlElement(pdfPage.commonObjs);
element = AnnotationUtils.getHtmlElement(data, pdfPage.commonObjs);
element.setAttribute('data-annotation-id', data.id);
mozL10n.translate(element);
data = annotation.getData();
var rect = data.rect;
var view = pdfPage.view;
rect = PDFJS.Util.normalizeRect([

View file

@ -48,13 +48,13 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<!--#if !PRODUCTION-->
<script src="../src/shared/util.js"></script>
<script src="../src/shared/annotation.js"></script>
<script src="../src/display/api.js"></script>
<script src="../src/display/metadata.js"></script>
<script src="../src/display/canvas.js"></script>
<script src="../src/display/webgl.js"></script>
<script src="../src/display/pattern_helper.js"></script>
<script src="../src/display/font_loader.js"></script>
<script src="../src/display/annotation_helper.js"></script>
<script>PDFJS.workerSrc = '../src/worker_loader.js';</script>
<!--#endif-->