pdfjs-dist 2.2.228 → 2.6.347
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pdfjs-dist might be problematic. Click here for more details.
- package/README.md +4 -0
- package/bower.json +1 -1
- package/build/pdf.js +8816 -19300
- package/build/pdf.js.map +1 -1
- package/build/pdf.min.js +22 -1
- package/build/pdf.worker.entry.js +5 -3
- package/build/pdf.worker.js +27185 -35746
- package/build/pdf.worker.js.map +1 -1
- package/build/pdf.worker.min.js +22 -1
- package/es5/build/pdf.js +26665 -0
- package/es5/build/pdf.js.map +1 -0
- package/es5/build/pdf.min.js +22 -0
- package/{lib/shared/global_scope.js → es5/build/pdf.worker.entry.js} +5 -10
- package/es5/build/pdf.worker.js +61231 -0
- package/es5/build/pdf.worker.js.map +1 -0
- package/es5/build/pdf.worker.min.js +22 -0
- package/es5/image_decoders/pdf.image_decoders.js +12529 -0
- package/es5/image_decoders/pdf.image_decoders.js.map +1 -0
- package/es5/image_decoders/pdf.image_decoders.min.js +22 -0
- package/es5/web/images/annotation-check.svg +11 -0
- package/es5/web/images/annotation-comment.svg +16 -0
- package/es5/web/images/annotation-help.svg +26 -0
- package/es5/web/images/annotation-insert.svg +10 -0
- package/es5/web/images/annotation-key.svg +11 -0
- package/es5/web/images/annotation-newparagraph.svg +11 -0
- package/es5/web/images/annotation-noicon.svg +7 -0
- package/es5/web/images/annotation-note.svg +42 -0
- package/es5/web/images/annotation-paragraph.svg +16 -0
- package/es5/web/images/loading-icon.gif +0 -0
- package/es5/web/images/shadow.png +0 -0
- package/es5/web/pdf_viewer.css +406 -0
- package/es5/web/pdf_viewer.js +7886 -0
- package/es5/web/pdf_viewer.js.map +1 -0
- package/image_decoders/pdf.image_decoders.js +1498 -4832
- package/image_decoders/pdf.image_decoders.js.map +1 -1
- package/image_decoders/pdf.image_decoders.min.js +22 -1
- package/lib/README.md +7 -0
- package/lib/core/annotation.js +1144 -927
- package/lib/core/arithmetic_decoder.js +81 -97
- package/lib/core/bidi.js +54 -46
- package/lib/core/ccitt.js +88 -81
- package/lib/core/ccitt_stream.js +15 -14
- package/lib/core/cff_parser.js +747 -716
- package/lib/core/charsets.js +4 -4
- package/lib/core/chunked_stream.js +462 -553
- package/lib/core/cmap.js +231 -277
- package/lib/core/colorspace.js +715 -857
- package/lib/core/core_utils.js +57 -52
- package/lib/core/crypto.js +416 -437
- package/lib/core/document.js +629 -670
- package/lib/core/encodings.js +15 -15
- package/lib/core/evaluator.js +3229 -2800
- package/lib/core/font_renderer.js +135 -178
- package/lib/core/fonts.js +602 -534
- package/lib/core/function.js +355 -279
- package/lib/core/glyphlist.js +4527 -4526
- package/lib/core/image.js +442 -439
- package/lib/core/image_utils.js +221 -61
- package/lib/core/jbig2.js +325 -316
- package/lib/core/jbig2_stream.js +18 -17
- package/lib/core/jpeg_stream.js +21 -26
- package/lib/core/jpg.js +289 -233
- package/lib/core/jpx.js +161 -143
- package/lib/core/jpx_stream.js +28 -28
- package/lib/core/metrics.js +2928 -2928
- package/lib/core/murmurhash3.js +87 -102
- package/lib/core/obj.js +1343 -1300
- package/lib/core/operator_list.js +90 -67
- package/lib/core/parser.js +990 -987
- package/lib/core/pattern.js +105 -77
- package/lib/core/pdf_manager.js +149 -316
- package/lib/core/primitives.js +156 -104
- package/lib/core/ps_parser.js +175 -214
- package/lib/core/standard_fonts.js +237 -236
- package/lib/core/stream.js +94 -74
- package/lib/core/type1_parser.js +89 -69
- package/lib/core/unicode.js +1654 -1654
- package/lib/core/worker.js +275 -290
- package/lib/core/worker_stream.js +101 -210
- package/lib/core/writer.js +242 -0
- package/lib/display/annotation_layer.js +772 -1041
- package/lib/display/annotation_storage.js +89 -0
- package/lib/display/api.js +1575 -1868
- package/lib/display/api_compatibility.js +12 -17
- package/lib/display/canvas.js +370 -222
- package/lib/display/content_disposition.js +40 -59
- package/lib/display/display_utils.js +341 -536
- package/lib/display/fetch_stream.js +188 -304
- package/lib/display/font_loader.js +282 -414
- package/lib/display/metadata.js +81 -99
- package/lib/display/network.js +362 -511
- package/lib/display/network_utils.js +25 -18
- package/lib/display/node_stream.js +283 -465
- package/lib/display/node_utils.js +87 -0
- package/lib/display/optional_content_config.js +184 -0
- package/lib/display/pattern_helper.js +93 -44
- package/lib/display/svg.js +1163 -1401
- package/lib/display/text_layer.js +154 -137
- package/lib/display/transport_stream.js +237 -375
- package/lib/display/webgl.js +70 -83
- package/lib/display/worker_options.js +3 -3
- package/lib/display/xml_parser.js +303 -392
- package/lib/examples/node/domstubs.js +37 -37
- package/lib/pdf.js +220 -58
- package/lib/pdf.worker.js +14 -6
- package/lib/shared/compatibility.js +3 -246
- package/lib/shared/is_node.js +7 -6
- package/lib/shared/message_handler.js +327 -332
- package/lib/shared/util.js +271 -306
- package/lib/test/unit/annotation_spec.js +1902 -763
- package/lib/test/unit/annotation_storage_spec.js +83 -0
- package/lib/test/unit/api_spec.js +790 -592
- package/lib/test/unit/bidi_spec.js +7 -7
- package/lib/test/unit/cff_parser_spec.js +73 -72
- package/lib/test/unit/clitests_helper.js +7 -9
- package/lib/test/unit/cmap_spec.js +86 -88
- package/lib/test/unit/colorspace_spec.js +346 -154
- package/lib/test/unit/core_utils_spec.js +125 -105
- package/lib/test/unit/crypto_spec.js +232 -185
- package/lib/test/unit/custom_spec.js +150 -24
- package/lib/test/unit/display_svg_spec.js +34 -39
- package/lib/test/unit/display_utils_spec.js +139 -149
- package/lib/test/unit/document_spec.js +128 -17
- package/lib/test/unit/encodings_spec.js +12 -34
- package/lib/test/unit/evaluator_spec.js +112 -91
- package/lib/test/unit/fetch_stream_spec.js +31 -29
- package/lib/test/unit/function_spec.js +206 -204
- package/lib/test/unit/jasmine-boot.js +48 -32
- package/lib/test/unit/message_handler_spec.js +173 -159
- package/lib/test/unit/metadata_spec.js +71 -71
- package/lib/test/unit/murmurhash3_spec.js +12 -12
- package/lib/test/unit/network_spec.js +13 -11
- package/lib/test/unit/network_utils_spec.js +158 -144
- package/lib/test/unit/node_stream_spec.js +76 -90
- package/lib/test/unit/parser_spec.js +108 -114
- package/lib/test/unit/pdf_find_controller_spec.js +55 -86
- package/lib/test/unit/pdf_find_utils_spec.js +32 -32
- package/lib/test/unit/pdf_history_spec.js +32 -32
- package/lib/test/unit/primitives_spec.js +337 -156
- package/lib/test/unit/stream_spec.js +16 -14
- package/lib/test/unit/test_utils.js +91 -304
- package/lib/test/unit/testreporter.js +33 -22
- package/lib/test/unit/type1_parser_spec.js +42 -42
- package/lib/test/unit/ui_utils_spec.js +299 -461
- package/lib/test/unit/unicode_spec.js +42 -42
- package/lib/test/unit/util_spec.js +129 -149
- package/lib/test/unit/writer_spec.js +84 -0
- package/lib/web/annotation_layer_builder.js +78 -111
- package/lib/web/app.js +1542 -1267
- package/lib/web/app_options.js +76 -91
- package/lib/web/base_tree_viewer.js +100 -0
- package/lib/web/base_viewer.js +869 -834
- package/lib/web/chromecom.js +165 -252
- package/lib/web/debugger.js +149 -205
- package/lib/web/download_manager.js +34 -58
- package/lib/web/firefox_print_service.js +62 -34
- package/lib/web/firefoxcom.js +206 -374
- package/lib/web/genericcom.js +26 -108
- package/lib/web/genericl10n.js +24 -153
- package/lib/web/grab_to_pan.js +30 -30
- package/lib/web/interfaces.js +80 -254
- package/lib/web/overlay_manager.js +70 -246
- package/lib/web/password_prompt.js +38 -64
- package/lib/web/pdf_attachment_viewer.js +150 -126
- package/lib/web/pdf_cursor_tools.js +75 -102
- package/lib/web/pdf_document_properties.js +229 -383
- package/lib/web/pdf_find_bar.js +136 -170
- package/lib/web/pdf_find_controller.js +492 -548
- package/lib/web/pdf_find_utils.js +13 -13
- package/lib/web/pdf_history.js +397 -406
- package/lib/web/pdf_layer_viewer.js +208 -0
- package/lib/web/pdf_link_service.js +304 -348
- package/lib/web/pdf_outline_viewer.js +119 -212
- package/lib/web/pdf_page_view.js +474 -513
- package/lib/web/pdf_presentation_mode.js +308 -357
- package/lib/web/pdf_print_service.js +96 -110
- package/lib/web/pdf_rendering_queue.js +87 -108
- package/lib/web/pdf_sidebar.js +286 -302
- package/lib/web/pdf_sidebar_resizer.js +92 -119
- package/lib/web/pdf_single_page_viewer.js +77 -126
- package/lib/web/pdf_thumbnail_view.js +289 -297
- package/lib/web/pdf_thumbnail_viewer.js +202 -206
- package/lib/web/pdf_viewer.component.js +20 -21
- package/lib/web/pdf_viewer.js +55 -115
- package/lib/web/preferences.js +69 -273
- package/lib/web/secondary_toolbar.js +164 -196
- package/lib/web/text_layer_builder.js +284 -319
- package/lib/web/toolbar.js +217 -210
- package/lib/web/ui_utils.js +274 -421
- package/lib/web/view_history.js +52 -226
- package/lib/web/viewer_compatibility.js +21 -6
- package/package.json +4 -9
- package/types/display/annotation_layer.d.ts +61 -0
- package/types/display/annotation_storage.d.ts +36 -0
- package/types/display/api.d.ts +1107 -0
- package/types/display/api_compatibility.d.ts +1 -0
- package/types/display/canvas.d.ts +4 -0
- package/types/display/content_disposition.d.ts +7 -0
- package/types/display/display_utils.d.ts +243 -0
- package/types/display/fetch_stream.d.ts +67 -0
- package/types/display/font_loader.d.ts +19 -0
- package/types/display/metadata.d.ts +9 -0
- package/types/display/network.d.ts +80 -0
- package/types/display/network_utils.d.ts +14 -0
- package/types/display/node_stream.d.ts +72 -0
- package/types/display/node_utils.d.ts +6 -0
- package/types/display/optional_content_config.d.ts +12 -0
- package/types/display/pattern_helper.d.ts +5 -0
- package/types/display/svg.d.ts +2 -0
- package/types/display/text_layer.d.ts +83 -0
- package/types/display/transport_stream.d.ts +57 -0
- package/types/display/webgl.d.ts +20 -0
- package/types/display/worker_options.d.ts +27 -0
- package/types/display/xml_parser.d.ts +35 -0
- package/types/pdf.d.ts +33 -0
- package/types/shared/compatibility.d.ts +1 -0
- package/types/shared/is_node.d.ts +1 -0
- package/types/shared/message_handler.d.ts +62 -0
- package/types/shared/util.d.ts +421 -0
- package/web/images/shadow.png +0 -0
- package/web/pdf_viewer.css +29 -27
- package/web/pdf_viewer.js +3524 -4746
- package/web/pdf_viewer.js.map +1 -1
- package/webpack.js +6 -5
- package/external/streams/streams-lib.js +0 -3962
- package/external/url/url-lib.js +0 -627
- package/lib/shared/streams_polyfill.js +0 -43
- package/lib/shared/url_polyfill.js +0 -56
- package/web/images/texture.png +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2020 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -26,136 +26,99 @@ Object.defineProperty(exports, "__esModule", {
|
|
26
26
|
});
|
27
27
|
exports.AnnotationLayer = void 0;
|
28
28
|
|
29
|
-
var _display_utils = require("./display_utils");
|
29
|
+
var _display_utils = require("./display_utils.js");
|
30
30
|
|
31
|
-
var _util = require("../shared/util");
|
31
|
+
var _util = require("../shared/util.js");
|
32
32
|
|
33
|
-
|
33
|
+
var _annotation_storage = require("./annotation_storage.js");
|
34
34
|
|
35
|
-
|
35
|
+
class AnnotationElementFactory {
|
36
|
+
static create(parameters) {
|
37
|
+
const subtype = parameters.data.annotationType;
|
36
38
|
|
37
|
-
|
39
|
+
switch (subtype) {
|
40
|
+
case _util.AnnotationType.LINK:
|
41
|
+
return new LinkAnnotationElement(parameters);
|
38
42
|
|
39
|
-
|
43
|
+
case _util.AnnotationType.TEXT:
|
44
|
+
return new TextAnnotationElement(parameters);
|
40
45
|
|
41
|
-
|
46
|
+
case _util.AnnotationType.WIDGET:
|
47
|
+
const fieldType = parameters.data.fieldType;
|
42
48
|
|
43
|
-
|
49
|
+
switch (fieldType) {
|
50
|
+
case "Tx":
|
51
|
+
return new TextWidgetAnnotationElement(parameters);
|
44
52
|
|
45
|
-
|
53
|
+
case "Btn":
|
54
|
+
if (parameters.data.radioButton) {
|
55
|
+
return new RadioButtonWidgetAnnotationElement(parameters);
|
56
|
+
} else if (parameters.data.checkBox) {
|
57
|
+
return new CheckboxWidgetAnnotationElement(parameters);
|
58
|
+
}
|
46
59
|
|
47
|
-
|
60
|
+
return new PushButtonWidgetAnnotationElement(parameters);
|
48
61
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
54
|
-
|
55
|
-
var AnnotationElementFactory =
|
56
|
-
/*#__PURE__*/
|
57
|
-
function () {
|
58
|
-
function AnnotationElementFactory() {
|
59
|
-
_classCallCheck(this, AnnotationElementFactory);
|
60
|
-
}
|
61
|
-
|
62
|
-
_createClass(AnnotationElementFactory, null, [{
|
63
|
-
key: "create",
|
64
|
-
value: function create(parameters) {
|
65
|
-
var subtype = parameters.data.annotationType;
|
66
|
-
|
67
|
-
switch (subtype) {
|
68
|
-
case _util.AnnotationType.LINK:
|
69
|
-
return new LinkAnnotationElement(parameters);
|
70
|
-
|
71
|
-
case _util.AnnotationType.TEXT:
|
72
|
-
return new TextAnnotationElement(parameters);
|
73
|
-
|
74
|
-
case _util.AnnotationType.WIDGET:
|
75
|
-
var fieldType = parameters.data.fieldType;
|
76
|
-
|
77
|
-
switch (fieldType) {
|
78
|
-
case 'Tx':
|
79
|
-
return new TextWidgetAnnotationElement(parameters);
|
80
|
-
|
81
|
-
case 'Btn':
|
82
|
-
if (parameters.data.radioButton) {
|
83
|
-
return new RadioButtonWidgetAnnotationElement(parameters);
|
84
|
-
} else if (parameters.data.checkBox) {
|
85
|
-
return new CheckboxWidgetAnnotationElement(parameters);
|
86
|
-
}
|
87
|
-
|
88
|
-
return new PushButtonWidgetAnnotationElement(parameters);
|
89
|
-
|
90
|
-
case 'Ch':
|
91
|
-
return new ChoiceWidgetAnnotationElement(parameters);
|
92
|
-
}
|
62
|
+
case "Ch":
|
63
|
+
return new ChoiceWidgetAnnotationElement(parameters);
|
64
|
+
}
|
93
65
|
|
94
|
-
|
66
|
+
return new WidgetAnnotationElement(parameters);
|
95
67
|
|
96
|
-
|
97
|
-
|
68
|
+
case _util.AnnotationType.POPUP:
|
69
|
+
return new PopupAnnotationElement(parameters);
|
98
70
|
|
99
|
-
|
100
|
-
|
71
|
+
case _util.AnnotationType.FREETEXT:
|
72
|
+
return new FreeTextAnnotationElement(parameters);
|
101
73
|
|
102
|
-
|
103
|
-
|
74
|
+
case _util.AnnotationType.LINE:
|
75
|
+
return new LineAnnotationElement(parameters);
|
104
76
|
|
105
|
-
|
106
|
-
|
77
|
+
case _util.AnnotationType.SQUARE:
|
78
|
+
return new SquareAnnotationElement(parameters);
|
107
79
|
|
108
|
-
|
109
|
-
|
80
|
+
case _util.AnnotationType.CIRCLE:
|
81
|
+
return new CircleAnnotationElement(parameters);
|
110
82
|
|
111
|
-
|
112
|
-
|
83
|
+
case _util.AnnotationType.POLYLINE:
|
84
|
+
return new PolylineAnnotationElement(parameters);
|
113
85
|
|
114
|
-
|
115
|
-
|
86
|
+
case _util.AnnotationType.CARET:
|
87
|
+
return new CaretAnnotationElement(parameters);
|
116
88
|
|
117
|
-
|
118
|
-
|
89
|
+
case _util.AnnotationType.INK:
|
90
|
+
return new InkAnnotationElement(parameters);
|
119
91
|
|
120
|
-
|
121
|
-
|
92
|
+
case _util.AnnotationType.POLYGON:
|
93
|
+
return new PolygonAnnotationElement(parameters);
|
122
94
|
|
123
|
-
|
124
|
-
|
95
|
+
case _util.AnnotationType.HIGHLIGHT:
|
96
|
+
return new HighlightAnnotationElement(parameters);
|
125
97
|
|
126
|
-
|
127
|
-
|
98
|
+
case _util.AnnotationType.UNDERLINE:
|
99
|
+
return new UnderlineAnnotationElement(parameters);
|
128
100
|
|
129
|
-
|
130
|
-
|
101
|
+
case _util.AnnotationType.SQUIGGLY:
|
102
|
+
return new SquigglyAnnotationElement(parameters);
|
131
103
|
|
132
|
-
|
133
|
-
|
104
|
+
case _util.AnnotationType.STRIKEOUT:
|
105
|
+
return new StrikeOutAnnotationElement(parameters);
|
134
106
|
|
135
|
-
|
136
|
-
|
107
|
+
case _util.AnnotationType.STAMP:
|
108
|
+
return new StampAnnotationElement(parameters);
|
137
109
|
|
138
|
-
|
139
|
-
|
110
|
+
case _util.AnnotationType.FILEATTACHMENT:
|
111
|
+
return new FileAttachmentAnnotationElement(parameters);
|
140
112
|
|
141
|
-
|
142
|
-
|
143
|
-
}
|
113
|
+
default:
|
114
|
+
return new AnnotationElement(parameters);
|
144
115
|
}
|
145
|
-
}
|
146
|
-
|
147
|
-
return AnnotationElementFactory;
|
148
|
-
}();
|
149
|
-
|
150
|
-
var AnnotationElement =
|
151
|
-
/*#__PURE__*/
|
152
|
-
function () {
|
153
|
-
function AnnotationElement(parameters) {
|
154
|
-
var isRenderable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
155
|
-
var ignoreBorder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
116
|
+
}
|
156
117
|
|
157
|
-
|
118
|
+
}
|
158
119
|
|
120
|
+
class AnnotationElement {
|
121
|
+
constructor(parameters, isRenderable = false, ignoreBorder = false) {
|
159
122
|
this.isRenderable = isRenderable;
|
160
123
|
this.data = parameters.data;
|
161
124
|
this.layer = parameters.layer;
|
@@ -166,523 +129,455 @@ function () {
|
|
166
129
|
this.imageResourcesPath = parameters.imageResourcesPath;
|
167
130
|
this.renderInteractiveForms = parameters.renderInteractiveForms;
|
168
131
|
this.svgFactory = parameters.svgFactory;
|
132
|
+
this.annotationStorage = parameters.annotationStorage;
|
169
133
|
|
170
134
|
if (isRenderable) {
|
171
135
|
this.container = this._createContainer(ignoreBorder);
|
172
136
|
}
|
173
137
|
}
|
174
138
|
|
175
|
-
|
176
|
-
|
177
|
-
value: function _createContainer() {
|
178
|
-
var ignoreBorder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
179
|
-
var data = this.data,
|
139
|
+
_createContainer(ignoreBorder = false) {
|
140
|
+
const data = this.data,
|
180
141
|
page = this.page,
|
181
142
|
viewport = this.viewport;
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
143
|
+
const container = document.createElement("section");
|
144
|
+
let width = data.rect[2] - data.rect[0];
|
145
|
+
let height = data.rect[3] - data.rect[1];
|
146
|
+
container.setAttribute("data-annotation-id", data.id);
|
186
147
|
|
187
|
-
|
148
|
+
const rect = _util.Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]);
|
188
149
|
|
189
|
-
|
190
|
-
|
150
|
+
container.style.transform = `matrix(${viewport.transform.join(",")})`;
|
151
|
+
container.style.transformOrigin = `-${rect[0]}px -${rect[1]}px`;
|
191
152
|
|
192
|
-
|
193
|
-
|
153
|
+
if (!ignoreBorder && data.borderStyle.width > 0) {
|
154
|
+
container.style.borderWidth = `${data.borderStyle.width}px`;
|
194
155
|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
var horizontalRadius = data.borderStyle.horizontalCornerRadius;
|
201
|
-
var verticalRadius = data.borderStyle.verticalCornerRadius;
|
156
|
+
if (data.borderStyle.style !== _util.AnnotationBorderStyleType.UNDERLINE) {
|
157
|
+
width = width - 2 * data.borderStyle.width;
|
158
|
+
height = height - 2 * data.borderStyle.width;
|
159
|
+
}
|
202
160
|
|
203
|
-
|
204
|
-
|
205
|
-
container.style.borderRadius = radius;
|
206
|
-
}
|
161
|
+
const horizontalRadius = data.borderStyle.horizontalCornerRadius;
|
162
|
+
const verticalRadius = data.borderStyle.verticalCornerRadius;
|
207
163
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
164
|
+
if (horizontalRadius > 0 || verticalRadius > 0) {
|
165
|
+
const radius = `${horizontalRadius}px / ${verticalRadius}px`;
|
166
|
+
container.style.borderRadius = radius;
|
167
|
+
}
|
212
168
|
|
213
|
-
|
214
|
-
|
215
|
-
|
169
|
+
switch (data.borderStyle.style) {
|
170
|
+
case _util.AnnotationBorderStyleType.SOLID:
|
171
|
+
container.style.borderStyle = "solid";
|
172
|
+
break;
|
216
173
|
|
217
|
-
|
218
|
-
|
219
|
-
|
174
|
+
case _util.AnnotationBorderStyleType.DASHED:
|
175
|
+
container.style.borderStyle = "dashed";
|
176
|
+
break;
|
220
177
|
|
221
|
-
|
222
|
-
|
223
|
-
|
178
|
+
case _util.AnnotationBorderStyleType.BEVELED:
|
179
|
+
(0, _util.warn)("Unimplemented border style: beveled");
|
180
|
+
break;
|
224
181
|
|
225
|
-
|
226
|
-
|
227
|
-
|
182
|
+
case _util.AnnotationBorderStyleType.INSET:
|
183
|
+
(0, _util.warn)("Unimplemented border style: inset");
|
184
|
+
break;
|
228
185
|
|
229
|
-
|
230
|
-
|
231
|
-
|
186
|
+
case _util.AnnotationBorderStyleType.UNDERLINE:
|
187
|
+
container.style.borderBottomStyle = "solid";
|
188
|
+
break;
|
232
189
|
|
233
|
-
|
234
|
-
|
235
|
-
} else {
|
236
|
-
container.style.borderWidth = 0;
|
237
|
-
}
|
190
|
+
default:
|
191
|
+
break;
|
238
192
|
}
|
239
193
|
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
return container;
|
245
|
-
}
|
246
|
-
}, {
|
247
|
-
key: "_createPopup",
|
248
|
-
value: function _createPopup(container, trigger, data) {
|
249
|
-
if (!trigger) {
|
250
|
-
trigger = document.createElement('div');
|
251
|
-
trigger.style.height = container.style.height;
|
252
|
-
trigger.style.width = container.style.width;
|
253
|
-
container.appendChild(trigger);
|
194
|
+
if (data.color) {
|
195
|
+
container.style.borderColor = _util.Util.makeCssRgb(data.color[0] | 0, data.color[1] | 0, data.color[2] | 0);
|
196
|
+
} else {
|
197
|
+
container.style.borderWidth = 0;
|
254
198
|
}
|
255
|
-
|
256
|
-
var popupElement = new PopupElement({
|
257
|
-
container: container,
|
258
|
-
trigger: trigger,
|
259
|
-
color: data.color,
|
260
|
-
title: data.title,
|
261
|
-
modificationDate: data.modificationDate,
|
262
|
-
contents: data.contents,
|
263
|
-
hideWrapper: true
|
264
|
-
});
|
265
|
-
var popup = popupElement.render();
|
266
|
-
popup.style.left = container.style.width;
|
267
|
-
container.appendChild(popup);
|
268
199
|
}
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
200
|
+
|
201
|
+
container.style.left = `${rect[0]}px`;
|
202
|
+
container.style.top = `${rect[1]}px`;
|
203
|
+
container.style.width = `${width}px`;
|
204
|
+
container.style.height = `${height}px`;
|
205
|
+
return container;
|
206
|
+
}
|
207
|
+
|
208
|
+
_createPopup(container, trigger, data) {
|
209
|
+
if (!trigger) {
|
210
|
+
trigger = document.createElement("div");
|
211
|
+
trigger.style.height = container.style.height;
|
212
|
+
trigger.style.width = container.style.width;
|
213
|
+
container.appendChild(trigger);
|
273
214
|
}
|
274
|
-
}]);
|
275
215
|
|
276
|
-
|
277
|
-
|
216
|
+
const popupElement = new PopupElement({
|
217
|
+
container,
|
218
|
+
trigger,
|
219
|
+
color: data.color,
|
220
|
+
title: data.title,
|
221
|
+
modificationDate: data.modificationDate,
|
222
|
+
contents: data.contents,
|
223
|
+
hideWrapper: true
|
224
|
+
});
|
225
|
+
const popup = popupElement.render();
|
226
|
+
popup.style.left = container.style.width;
|
227
|
+
container.appendChild(popup);
|
228
|
+
}
|
278
229
|
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
_inherits(LinkAnnotationElement, _AnnotationElement);
|
230
|
+
render() {
|
231
|
+
(0, _util.unreachable)("Abstract method `AnnotationElement.render` called");
|
232
|
+
}
|
283
233
|
|
284
|
-
|
285
|
-
_classCallCheck(this, LinkAnnotationElement);
|
234
|
+
}
|
286
235
|
|
287
|
-
|
288
|
-
|
236
|
+
class LinkAnnotationElement extends AnnotationElement {
|
237
|
+
constructor(parameters) {
|
238
|
+
const isRenderable = !!(parameters.data.url || parameters.data.dest || parameters.data.action);
|
239
|
+
super(parameters, isRenderable);
|
289
240
|
}
|
290
241
|
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
242
|
+
render() {
|
243
|
+
this.container.className = "linkAnnotation";
|
244
|
+
const {
|
245
|
+
data,
|
246
|
+
linkService
|
247
|
+
} = this;
|
248
|
+
const link = document.createElement("a");
|
249
|
+
|
250
|
+
if (data.url) {
|
298
251
|
(0, _display_utils.addLinkAttributes)(link, {
|
299
252
|
url: data.url,
|
300
253
|
target: data.newWindow ? _display_utils.LinkTarget.BLANK : linkService.externalLinkTarget,
|
301
|
-
rel: linkService.externalLinkRel
|
254
|
+
rel: linkService.externalLinkRel,
|
255
|
+
enabled: linkService.externalLinkEnabled
|
302
256
|
});
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
} else {
|
308
|
-
this._bindLink(link, data.dest);
|
309
|
-
}
|
310
|
-
}
|
311
|
-
|
312
|
-
this.container.appendChild(link);
|
313
|
-
return this.container;
|
257
|
+
} else if (data.action) {
|
258
|
+
this._bindNamedAction(link, data.action);
|
259
|
+
} else {
|
260
|
+
this._bindLink(link, data.dest);
|
314
261
|
}
|
315
|
-
}, {
|
316
|
-
key: "_bindLink",
|
317
|
-
value: function _bindLink(link, destination) {
|
318
|
-
var _this = this;
|
319
|
-
|
320
|
-
link.href = this.linkService.getDestinationHash(destination);
|
321
262
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
}
|
263
|
+
this.container.appendChild(link);
|
264
|
+
return this.container;
|
265
|
+
}
|
326
266
|
|
327
|
-
|
328
|
-
|
267
|
+
_bindLink(link, destination) {
|
268
|
+
link.href = this.linkService.getDestinationHash(destination);
|
329
269
|
|
270
|
+
link.onclick = () => {
|
330
271
|
if (destination) {
|
331
|
-
|
272
|
+
this.linkService.navigateTo(destination);
|
332
273
|
}
|
333
|
-
}
|
334
|
-
}, {
|
335
|
-
key: "_bindNamedAction",
|
336
|
-
value: function _bindNamedAction(link, action) {
|
337
|
-
var _this2 = this;
|
338
|
-
|
339
|
-
link.href = this.linkService.getAnchorUrl('');
|
340
274
|
|
341
|
-
|
342
|
-
|
275
|
+
return false;
|
276
|
+
};
|
343
277
|
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
link.className = 'internalLink';
|
278
|
+
if (destination) {
|
279
|
+
link.className = "internalLink";
|
348
280
|
}
|
349
|
-
}
|
350
|
-
|
351
|
-
return LinkAnnotationElement;
|
352
|
-
}(AnnotationElement);
|
281
|
+
}
|
353
282
|
|
354
|
-
|
355
|
-
|
356
|
-
function (_AnnotationElement2) {
|
357
|
-
_inherits(TextAnnotationElement, _AnnotationElement2);
|
283
|
+
_bindNamedAction(link, action) {
|
284
|
+
link.href = this.linkService.getAnchorUrl("");
|
358
285
|
|
359
|
-
|
360
|
-
|
286
|
+
link.onclick = () => {
|
287
|
+
this.linkService.executeNamedAction(action);
|
288
|
+
return false;
|
289
|
+
};
|
361
290
|
|
362
|
-
|
363
|
-
return _possibleConstructorReturn(this, _getPrototypeOf(TextAnnotationElement).call(this, parameters, isRenderable));
|
291
|
+
link.className = "internalLink";
|
364
292
|
}
|
365
293
|
|
366
|
-
|
367
|
-
key: "render",
|
368
|
-
value: function render() {
|
369
|
-
this.container.className = 'textAnnotation';
|
370
|
-
var image = document.createElement('img');
|
371
|
-
image.style.height = this.container.style.height;
|
372
|
-
image.style.width = this.container.style.width;
|
373
|
-
image.src = this.imageResourcesPath + 'annotation-' + this.data.name.toLowerCase() + '.svg';
|
374
|
-
image.alt = '[{{type}} Annotation]';
|
375
|
-
image.dataset.l10nId = 'text_annotation_type';
|
376
|
-
image.dataset.l10nArgs = JSON.stringify({
|
377
|
-
type: this.data.name
|
378
|
-
});
|
294
|
+
}
|
379
295
|
|
380
|
-
|
381
|
-
|
382
|
-
|
296
|
+
class TextAnnotationElement extends AnnotationElement {
|
297
|
+
constructor(parameters) {
|
298
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
299
|
+
super(parameters, isRenderable);
|
300
|
+
}
|
383
301
|
|
384
|
-
|
385
|
-
|
302
|
+
render() {
|
303
|
+
this.container.className = "textAnnotation";
|
304
|
+
const image = document.createElement("img");
|
305
|
+
image.style.height = this.container.style.height;
|
306
|
+
image.style.width = this.container.style.width;
|
307
|
+
image.src = this.imageResourcesPath + "annotation-" + this.data.name.toLowerCase() + ".svg";
|
308
|
+
image.alt = "[{{type}} Annotation]";
|
309
|
+
image.dataset.l10nId = "text_annotation_type";
|
310
|
+
image.dataset.l10nArgs = JSON.stringify({
|
311
|
+
type: this.data.name
|
312
|
+
});
|
313
|
+
|
314
|
+
if (!this.data.hasPopup) {
|
315
|
+
this._createPopup(this.container, image, this.data);
|
386
316
|
}
|
387
|
-
}]);
|
388
|
-
|
389
|
-
return TextAnnotationElement;
|
390
|
-
}(AnnotationElement);
|
391
|
-
|
392
|
-
var WidgetAnnotationElement =
|
393
|
-
/*#__PURE__*/
|
394
|
-
function (_AnnotationElement3) {
|
395
|
-
_inherits(WidgetAnnotationElement, _AnnotationElement3);
|
396
|
-
|
397
|
-
function WidgetAnnotationElement() {
|
398
|
-
_classCallCheck(this, WidgetAnnotationElement);
|
399
317
|
|
400
|
-
|
318
|
+
this.container.appendChild(image);
|
319
|
+
return this.container;
|
401
320
|
}
|
402
321
|
|
403
|
-
|
404
|
-
key: "render",
|
405
|
-
value: function render() {
|
406
|
-
return this.container;
|
407
|
-
}
|
408
|
-
}]);
|
322
|
+
}
|
409
323
|
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
/*#__PURE__*/
|
415
|
-
function (_WidgetAnnotationElem) {
|
416
|
-
_inherits(TextWidgetAnnotationElement, _WidgetAnnotationElem);
|
324
|
+
class WidgetAnnotationElement extends AnnotationElement {
|
325
|
+
render() {
|
326
|
+
return this.container;
|
327
|
+
}
|
417
328
|
|
418
|
-
|
419
|
-
_classCallCheck(this, TextWidgetAnnotationElement);
|
329
|
+
}
|
420
330
|
|
421
|
-
|
422
|
-
|
331
|
+
class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
332
|
+
constructor(parameters) {
|
333
|
+
const isRenderable = parameters.renderInteractiveForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue;
|
334
|
+
super(parameters, isRenderable);
|
423
335
|
}
|
424
336
|
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
if (this.renderInteractiveForms) {
|
433
|
-
if (this.data.multiLine) {
|
434
|
-
element = document.createElement('textarea');
|
435
|
-
element.textContent = this.data.fieldValue;
|
436
|
-
} else {
|
437
|
-
element = document.createElement('input');
|
438
|
-
element.type = 'text';
|
439
|
-
element.setAttribute('value', this.data.fieldValue);
|
440
|
-
}
|
441
|
-
|
442
|
-
element.disabled = this.data.readOnly;
|
337
|
+
render() {
|
338
|
+
const TEXT_ALIGNMENT = ["left", "center", "right"];
|
339
|
+
const storage = this.annotationStorage;
|
340
|
+
const id = this.data.id;
|
341
|
+
this.container.className = "textWidgetAnnotation";
|
342
|
+
let element = null;
|
443
343
|
|
444
|
-
|
445
|
-
|
446
|
-
}
|
344
|
+
if (this.renderInteractiveForms) {
|
345
|
+
const textContent = storage.getOrCreateValue(id, this.data.fieldValue);
|
447
346
|
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
element.classList.add('comb');
|
452
|
-
element.style.letterSpacing = 'calc(' + combWidth + 'px - 1ch)';
|
453
|
-
}
|
347
|
+
if (this.data.multiLine) {
|
348
|
+
element = document.createElement("textarea");
|
349
|
+
element.textContent = textContent;
|
454
350
|
} else {
|
455
|
-
element = document.createElement(
|
456
|
-
element.
|
457
|
-
element.
|
458
|
-
element.style.display = 'table-cell';
|
459
|
-
var font = null;
|
460
|
-
|
461
|
-
if (this.data.fontRefName && this.page.commonObjs.has(this.data.fontRefName)) {
|
462
|
-
font = this.page.commonObjs.get(this.data.fontRefName);
|
463
|
-
}
|
464
|
-
|
465
|
-
this._setTextStyle(element, font);
|
351
|
+
element = document.createElement("input");
|
352
|
+
element.type = "text";
|
353
|
+
element.setAttribute("value", textContent);
|
466
354
|
}
|
467
355
|
|
468
|
-
|
469
|
-
|
356
|
+
element.addEventListener("input", function (event) {
|
357
|
+
storage.setValue(id, event.target.value);
|
358
|
+
});
|
359
|
+
element.disabled = this.data.readOnly;
|
360
|
+
element.name = this.data.fieldName;
|
361
|
+
|
362
|
+
if (this.data.maxLen !== null) {
|
363
|
+
element.maxLength = this.data.maxLen;
|
470
364
|
}
|
471
365
|
|
472
|
-
this.
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
366
|
+
if (this.data.comb) {
|
367
|
+
const fieldWidth = this.data.rect[2] - this.data.rect[0];
|
368
|
+
const combWidth = fieldWidth / this.data.maxLen;
|
369
|
+
element.classList.add("comb");
|
370
|
+
element.style.letterSpacing = `calc(${combWidth}px - 1ch)`;
|
371
|
+
}
|
372
|
+
} else {
|
373
|
+
element = document.createElement("div");
|
374
|
+
element.textContent = this.data.fieldValue;
|
375
|
+
element.style.verticalAlign = "middle";
|
376
|
+
element.style.display = "table-cell";
|
377
|
+
let font = null;
|
378
|
+
|
379
|
+
if (this.data.fontRefName && this.page.commonObjs.has(this.data.fontRefName)) {
|
380
|
+
font = this.page.commonObjs.get(this.data.fontRefName);
|
484
381
|
}
|
485
382
|
|
486
|
-
|
487
|
-
style.fontStyle = font.italic ? 'italic' : 'normal';
|
488
|
-
var fontFamily = font.loadedName ? '"' + font.loadedName + '", ' : '';
|
489
|
-
var fallbackName = font.fallbackName || 'Helvetica, sans-serif';
|
490
|
-
style.fontFamily = fontFamily + fallbackName;
|
383
|
+
this._setTextStyle(element, font);
|
491
384
|
}
|
492
|
-
}]);
|
493
|
-
|
494
|
-
return TextWidgetAnnotationElement;
|
495
|
-
}(WidgetAnnotationElement);
|
496
385
|
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
_inherits(CheckboxWidgetAnnotationElement, _WidgetAnnotationElem2);
|
501
|
-
|
502
|
-
function CheckboxWidgetAnnotationElement(parameters) {
|
503
|
-
_classCallCheck(this, CheckboxWidgetAnnotationElement);
|
386
|
+
if (this.data.textAlignment !== null) {
|
387
|
+
element.style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment];
|
388
|
+
}
|
504
389
|
|
505
|
-
|
390
|
+
this.container.appendChild(element);
|
391
|
+
return this.container;
|
506
392
|
}
|
507
393
|
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
var element = document.createElement('input');
|
513
|
-
element.disabled = this.data.readOnly;
|
514
|
-
element.type = 'checkbox';
|
515
|
-
|
516
|
-
if (this.data.fieldValue && this.data.fieldValue !== 'Off') {
|
517
|
-
element.setAttribute('checked', true);
|
518
|
-
}
|
394
|
+
_setTextStyle(element, font) {
|
395
|
+
const style = element.style;
|
396
|
+
style.fontSize = `${this.data.fontSize}px`;
|
397
|
+
style.direction = this.data.fontDirection < 0 ? "rtl" : "ltr";
|
519
398
|
|
520
|
-
|
521
|
-
return
|
399
|
+
if (!font) {
|
400
|
+
return;
|
522
401
|
}
|
523
|
-
}]);
|
524
|
-
|
525
|
-
return CheckboxWidgetAnnotationElement;
|
526
|
-
}(WidgetAnnotationElement);
|
527
402
|
|
528
|
-
|
529
|
-
/*#__PURE__*/
|
530
|
-
function (_WidgetAnnotationElem3) {
|
531
|
-
_inherits(RadioButtonWidgetAnnotationElement, _WidgetAnnotationElem3);
|
403
|
+
let bold = "normal";
|
532
404
|
|
533
|
-
|
534
|
-
|
405
|
+
if (font.black) {
|
406
|
+
bold = "900";
|
407
|
+
} else if (font.bold) {
|
408
|
+
bold = "bold";
|
409
|
+
}
|
535
410
|
|
536
|
-
|
411
|
+
style.fontWeight = bold;
|
412
|
+
style.fontStyle = font.italic ? "italic" : "normal";
|
413
|
+
const fontFamily = font.loadedName ? `"${font.loadedName}", ` : "";
|
414
|
+
const fallbackName = font.fallbackName || "Helvetica, sans-serif";
|
415
|
+
style.fontFamily = fontFamily + fallbackName;
|
537
416
|
}
|
538
417
|
|
539
|
-
|
540
|
-
key: "render",
|
541
|
-
value: function render() {
|
542
|
-
this.container.className = 'buttonWidgetAnnotation radioButton';
|
543
|
-
var element = document.createElement('input');
|
544
|
-
element.disabled = this.data.readOnly;
|
545
|
-
element.type = 'radio';
|
546
|
-
element.name = this.data.fieldName;
|
418
|
+
}
|
547
419
|
|
548
|
-
|
549
|
-
|
550
|
-
|
420
|
+
class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {
|
421
|
+
constructor(parameters) {
|
422
|
+
super(parameters, parameters.renderInteractiveForms);
|
423
|
+
}
|
551
424
|
|
552
|
-
|
553
|
-
|
425
|
+
render() {
|
426
|
+
const storage = this.annotationStorage;
|
427
|
+
const data = this.data;
|
428
|
+
const id = data.id;
|
429
|
+
const value = storage.getOrCreateValue(id, data.fieldValue && data.fieldValue !== "Off");
|
430
|
+
this.container.className = "buttonWidgetAnnotation checkBox";
|
431
|
+
const element = document.createElement("input");
|
432
|
+
element.disabled = data.readOnly;
|
433
|
+
element.type = "checkbox";
|
434
|
+
element.name = this.data.fieldName;
|
435
|
+
|
436
|
+
if (value) {
|
437
|
+
element.setAttribute("checked", true);
|
554
438
|
}
|
555
|
-
}]);
|
556
|
-
|
557
|
-
return RadioButtonWidgetAnnotationElement;
|
558
|
-
}(WidgetAnnotationElement);
|
559
439
|
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
440
|
+
element.addEventListener("change", function (event) {
|
441
|
+
storage.setValue(id, event.target.checked);
|
442
|
+
});
|
443
|
+
this.container.appendChild(element);
|
444
|
+
return this.container;
|
445
|
+
}
|
564
446
|
|
565
|
-
|
566
|
-
_classCallCheck(this, PushButtonWidgetAnnotationElement);
|
447
|
+
}
|
567
448
|
|
568
|
-
|
449
|
+
class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement {
|
450
|
+
constructor(parameters) {
|
451
|
+
super(parameters, parameters.renderInteractiveForms);
|
569
452
|
}
|
570
453
|
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
454
|
+
render() {
|
455
|
+
this.container.className = "buttonWidgetAnnotation radioButton";
|
456
|
+
const storage = this.annotationStorage;
|
457
|
+
const data = this.data;
|
458
|
+
const id = data.id;
|
459
|
+
const value = storage.getOrCreateValue(id, data.fieldValue === data.buttonValue);
|
460
|
+
const element = document.createElement("input");
|
461
|
+
element.disabled = data.readOnly;
|
462
|
+
element.type = "radio";
|
463
|
+
element.name = data.fieldName;
|
464
|
+
|
465
|
+
if (value) {
|
466
|
+
element.setAttribute("checked", true);
|
578
467
|
}
|
579
|
-
}]);
|
580
|
-
|
581
|
-
return PushButtonWidgetAnnotationElement;
|
582
|
-
}(LinkAnnotationElement);
|
583
468
|
|
584
|
-
|
585
|
-
|
586
|
-
function (_WidgetAnnotationElem4) {
|
587
|
-
_inherits(ChoiceWidgetAnnotationElement, _WidgetAnnotationElem4);
|
469
|
+
element.addEventListener("change", function (event) {
|
470
|
+
const name = event.target.name;
|
588
471
|
|
589
|
-
|
590
|
-
|
472
|
+
for (const radio of document.getElementsByName(name)) {
|
473
|
+
if (radio !== event.target) {
|
474
|
+
storage.setValue(radio.parentNode.getAttribute("data-annotation-id"), false);
|
475
|
+
}
|
476
|
+
}
|
591
477
|
|
592
|
-
|
478
|
+
storage.setValue(id, event.target.checked);
|
479
|
+
});
|
480
|
+
this.container.appendChild(element);
|
481
|
+
return this.container;
|
593
482
|
}
|
594
483
|
|
595
|
-
|
596
|
-
key: "render",
|
597
|
-
value: function render() {
|
598
|
-
this.container.className = 'choiceWidgetAnnotation';
|
599
|
-
var selectElement = document.createElement('select');
|
600
|
-
selectElement.disabled = this.data.readOnly;
|
484
|
+
}
|
601
485
|
|
602
|
-
|
603
|
-
|
486
|
+
class PushButtonWidgetAnnotationElement extends LinkAnnotationElement {
|
487
|
+
render() {
|
488
|
+
const container = super.render();
|
489
|
+
container.className = "buttonWidgetAnnotation pushButton";
|
490
|
+
return container;
|
491
|
+
}
|
604
492
|
|
605
|
-
|
606
|
-
selectElement.multiple = true;
|
607
|
-
}
|
608
|
-
}
|
493
|
+
}
|
609
494
|
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
optionElement.value = option.exportValue;
|
495
|
+
class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement {
|
496
|
+
constructor(parameters) {
|
497
|
+
super(parameters, parameters.renderInteractiveForms);
|
498
|
+
}
|
615
499
|
|
616
|
-
|
617
|
-
|
618
|
-
|
500
|
+
render() {
|
501
|
+
this.container.className = "choiceWidgetAnnotation";
|
502
|
+
const storage = this.annotationStorage;
|
503
|
+
const id = this.data.id;
|
504
|
+
storage.getOrCreateValue(id, this.data.fieldValue.length > 0 ? this.data.fieldValue[0] : null);
|
505
|
+
const selectElement = document.createElement("select");
|
506
|
+
selectElement.disabled = this.data.readOnly;
|
507
|
+
selectElement.name = this.data.fieldName;
|
619
508
|
|
620
|
-
|
621
|
-
|
509
|
+
if (!this.data.combo) {
|
510
|
+
selectElement.size = this.data.options.length;
|
622
511
|
|
623
|
-
this.
|
624
|
-
|
512
|
+
if (this.data.multiSelect) {
|
513
|
+
selectElement.multiple = true;
|
514
|
+
}
|
625
515
|
}
|
626
|
-
}]);
|
627
516
|
|
628
|
-
|
629
|
-
|
517
|
+
for (const option of this.data.options) {
|
518
|
+
const optionElement = document.createElement("option");
|
519
|
+
optionElement.textContent = option.displayValue;
|
520
|
+
optionElement.value = option.exportValue;
|
630
521
|
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
_inherits(PopupAnnotationElement, _AnnotationElement4);
|
522
|
+
if (this.data.fieldValue.includes(option.exportValue)) {
|
523
|
+
optionElement.setAttribute("selected", true);
|
524
|
+
}
|
635
525
|
|
636
|
-
|
637
|
-
|
526
|
+
selectElement.appendChild(optionElement);
|
527
|
+
}
|
638
528
|
|
639
|
-
|
640
|
-
|
529
|
+
selectElement.addEventListener("input", function (event) {
|
530
|
+
const options = event.target.options;
|
531
|
+
const value = options[options.selectedIndex].value;
|
532
|
+
storage.setValue(id, value);
|
533
|
+
});
|
534
|
+
this.container.appendChild(selectElement);
|
535
|
+
return this.container;
|
641
536
|
}
|
642
537
|
|
643
|
-
|
644
|
-
key: "render",
|
645
|
-
value: function render() {
|
646
|
-
var IGNORE_TYPES = ['Line', 'Square', 'Circle', 'PolyLine', 'Polygon', 'Ink'];
|
647
|
-
this.container.className = 'popupAnnotation';
|
538
|
+
}
|
648
539
|
|
649
|
-
|
650
|
-
|
651
|
-
|
540
|
+
class PopupAnnotationElement extends AnnotationElement {
|
541
|
+
constructor(parameters) {
|
542
|
+
const isRenderable = !!(parameters.data.title || parameters.data.contents);
|
543
|
+
super(parameters, isRenderable);
|
544
|
+
}
|
652
545
|
|
653
|
-
|
654
|
-
|
546
|
+
render() {
|
547
|
+
const IGNORE_TYPES = ["Line", "Square", "Circle", "PolyLine", "Polygon", "Ink"];
|
548
|
+
this.container.className = "popupAnnotation";
|
655
549
|
|
656
|
-
|
657
|
-
|
658
|
-
|
550
|
+
if (IGNORE_TYPES.includes(this.data.parentType)) {
|
551
|
+
return this.container;
|
552
|
+
}
|
659
553
|
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
title: this.data.title,
|
665
|
-
modificationDate: this.data.modificationDate,
|
666
|
-
contents: this.data.contents
|
667
|
-
});
|
668
|
-
var parentLeft = parseFloat(parentElement.style.left);
|
669
|
-
var parentWidth = parseFloat(parentElement.style.width);
|
670
|
-
this.container.style.transformOrigin = -(parentLeft + parentWidth) + 'px -' + parentElement.style.top;
|
671
|
-
this.container.style.left = parentLeft + parentWidth + 'px';
|
672
|
-
this.container.appendChild(popup.render());
|
554
|
+
const selector = `[data-annotation-id="${this.data.parentId}"]`;
|
555
|
+
const parentElement = this.layer.querySelector(selector);
|
556
|
+
|
557
|
+
if (!parentElement) {
|
673
558
|
return this.container;
|
674
559
|
}
|
675
|
-
}]);
|
676
560
|
|
677
|
-
|
678
|
-
|
561
|
+
const popup = new PopupElement({
|
562
|
+
container: this.container,
|
563
|
+
trigger: parentElement,
|
564
|
+
color: this.data.color,
|
565
|
+
title: this.data.title,
|
566
|
+
modificationDate: this.data.modificationDate,
|
567
|
+
contents: this.data.contents
|
568
|
+
});
|
569
|
+
const parentLeft = parseFloat(parentElement.style.left);
|
570
|
+
const parentWidth = parseFloat(parentElement.style.width);
|
571
|
+
this.container.style.transformOrigin = `-${parentLeft + parentWidth}px -${parentElement.style.top}`;
|
572
|
+
this.container.style.left = `${parentLeft + parentWidth}px`;
|
573
|
+
this.container.appendChild(popup.render());
|
574
|
+
return this.container;
|
575
|
+
}
|
679
576
|
|
680
|
-
|
681
|
-
/*#__PURE__*/
|
682
|
-
function () {
|
683
|
-
function PopupElement(parameters) {
|
684
|
-
_classCallCheck(this, PopupElement);
|
577
|
+
}
|
685
578
|
|
579
|
+
class PopupElement {
|
580
|
+
constructor(parameters) {
|
686
581
|
this.container = parameters.container;
|
687
582
|
this.trigger = parameters.trigger;
|
688
583
|
this.color = parameters.color;
|
@@ -693,669 +588,505 @@ function () {
|
|
693
588
|
this.pinned = false;
|
694
589
|
}
|
695
590
|
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
popup.style.backgroundColor = _util.Util.makeCssRgb(r | 0, g | 0, b | 0);
|
713
|
-
}
|
591
|
+
render() {
|
592
|
+
const BACKGROUND_ENLIGHT = 0.7;
|
593
|
+
const wrapper = document.createElement("div");
|
594
|
+
wrapper.className = "popupWrapper";
|
595
|
+
this.hideElement = this.hideWrapper ? wrapper : this.container;
|
596
|
+
this.hideElement.setAttribute("hidden", true);
|
597
|
+
const popup = document.createElement("div");
|
598
|
+
popup.className = "popup";
|
599
|
+
const color = this.color;
|
600
|
+
|
601
|
+
if (color) {
|
602
|
+
const r = BACKGROUND_ENLIGHT * (255 - color[0]) + color[0];
|
603
|
+
const g = BACKGROUND_ENLIGHT * (255 - color[1]) + color[1];
|
604
|
+
const b = BACKGROUND_ENLIGHT * (255 - color[2]) + color[2];
|
605
|
+
popup.style.backgroundColor = _util.Util.makeCssRgb(r | 0, g | 0, b | 0);
|
606
|
+
}
|
714
607
|
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
var dateObject = _display_utils.PDFDateString.toDateObject(this.modificationDate);
|
720
|
-
|
721
|
-
if (dateObject) {
|
722
|
-
var modificationDate = document.createElement('span');
|
723
|
-
modificationDate.textContent = '{{date}}, {{time}}';
|
724
|
-
modificationDate.dataset.l10nId = 'annotation_date_string';
|
725
|
-
modificationDate.dataset.l10nArgs = JSON.stringify({
|
726
|
-
date: dateObject.toLocaleDateString(),
|
727
|
-
time: dateObject.toLocaleTimeString()
|
728
|
-
});
|
729
|
-
popup.appendChild(modificationDate);
|
730
|
-
}
|
608
|
+
const title = document.createElement("h1");
|
609
|
+
title.textContent = this.title;
|
610
|
+
popup.appendChild(title);
|
731
611
|
|
732
|
-
|
612
|
+
const dateObject = _display_utils.PDFDateString.toDateObject(this.modificationDate);
|
733
613
|
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
614
|
+
if (dateObject) {
|
615
|
+
const modificationDate = document.createElement("span");
|
616
|
+
modificationDate.textContent = "{{date}}, {{time}}";
|
617
|
+
modificationDate.dataset.l10nId = "annotation_date_string";
|
618
|
+
modificationDate.dataset.l10nArgs = JSON.stringify({
|
619
|
+
date: dateObject.toLocaleDateString(),
|
620
|
+
time: dateObject.toLocaleTimeString()
|
621
|
+
});
|
622
|
+
popup.appendChild(modificationDate);
|
741
623
|
}
|
742
|
-
}, {
|
743
|
-
key: "_formatContents",
|
744
|
-
value: function _formatContents(contents) {
|
745
|
-
var p = document.createElement('p');
|
746
|
-
var lines = contents.split(/(?:\r\n?|\n)/);
|
747
|
-
|
748
|
-
for (var i = 0, ii = lines.length; i < ii; ++i) {
|
749
|
-
var line = lines[i];
|
750
|
-
p.appendChild(document.createTextNode(line));
|
751
|
-
|
752
|
-
if (i < ii - 1) {
|
753
|
-
p.appendChild(document.createElement('br'));
|
754
|
-
}
|
755
|
-
}
|
756
624
|
|
757
|
-
|
758
|
-
}
|
759
|
-
}, {
|
760
|
-
key: "_toggle",
|
761
|
-
value: function _toggle() {
|
762
|
-
if (this.pinned) {
|
763
|
-
this._hide(true);
|
764
|
-
} else {
|
765
|
-
this._show(true);
|
766
|
-
}
|
767
|
-
}
|
768
|
-
}, {
|
769
|
-
key: "_show",
|
770
|
-
value: function _show() {
|
771
|
-
var pin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
625
|
+
const contents = this._formatContents(this.contents);
|
772
626
|
|
773
|
-
|
774
|
-
|
775
|
-
|
627
|
+
popup.appendChild(contents);
|
628
|
+
this.trigger.addEventListener("click", this._toggle.bind(this));
|
629
|
+
this.trigger.addEventListener("mouseover", this._show.bind(this, false));
|
630
|
+
this.trigger.addEventListener("mouseout", this._hide.bind(this, false));
|
631
|
+
popup.addEventListener("click", this._hide.bind(this, true));
|
632
|
+
wrapper.appendChild(popup);
|
633
|
+
return wrapper;
|
634
|
+
}
|
776
635
|
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
}
|
781
|
-
}
|
782
|
-
}, {
|
783
|
-
key: "_hide",
|
784
|
-
value: function _hide() {
|
785
|
-
var unpin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
636
|
+
_formatContents(contents) {
|
637
|
+
const p = document.createElement("p");
|
638
|
+
const lines = contents.split(/(?:\r\n?|\n)/);
|
786
639
|
|
787
|
-
|
788
|
-
|
789
|
-
|
640
|
+
for (let i = 0, ii = lines.length; i < ii; ++i) {
|
641
|
+
const line = lines[i];
|
642
|
+
p.appendChild(document.createTextNode(line));
|
790
643
|
|
791
|
-
if (
|
792
|
-
|
793
|
-
this.container.style.zIndex -= 1;
|
644
|
+
if (i < ii - 1) {
|
645
|
+
p.appendChild(document.createElement("br"));
|
794
646
|
}
|
795
647
|
}
|
796
|
-
}]);
|
797
648
|
|
798
|
-
|
799
|
-
}();
|
800
|
-
|
801
|
-
var FreeTextAnnotationElement =
|
802
|
-
/*#__PURE__*/
|
803
|
-
function (_AnnotationElement5) {
|
804
|
-
_inherits(FreeTextAnnotationElement, _AnnotationElement5);
|
805
|
-
|
806
|
-
function FreeTextAnnotationElement(parameters) {
|
807
|
-
_classCallCheck(this, FreeTextAnnotationElement);
|
808
|
-
|
809
|
-
var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
810
|
-
return _possibleConstructorReturn(this, _getPrototypeOf(FreeTextAnnotationElement).call(this, parameters, isRenderable, true));
|
649
|
+
return p;
|
811
650
|
}
|
812
651
|
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
if (!this.data.hasPopup) {
|
819
|
-
this._createPopup(this.container, null, this.data);
|
820
|
-
}
|
821
|
-
|
822
|
-
return this.container;
|
652
|
+
_toggle() {
|
653
|
+
if (this.pinned) {
|
654
|
+
this._hide(true);
|
655
|
+
} else {
|
656
|
+
this._show(true);
|
823
657
|
}
|
824
|
-
}]);
|
825
|
-
|
826
|
-
return FreeTextAnnotationElement;
|
827
|
-
}(AnnotationElement);
|
828
|
-
|
829
|
-
var LineAnnotationElement =
|
830
|
-
/*#__PURE__*/
|
831
|
-
function (_AnnotationElement6) {
|
832
|
-
_inherits(LineAnnotationElement, _AnnotationElement6);
|
833
|
-
|
834
|
-
function LineAnnotationElement(parameters) {
|
835
|
-
_classCallCheck(this, LineAnnotationElement);
|
836
|
-
|
837
|
-
var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
838
|
-
return _possibleConstructorReturn(this, _getPrototypeOf(LineAnnotationElement).call(this, parameters, isRenderable, true));
|
839
658
|
}
|
840
659
|
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
var data = this.data;
|
846
|
-
var width = data.rect[2] - data.rect[0];
|
847
|
-
var height = data.rect[3] - data.rect[1];
|
848
|
-
var svg = this.svgFactory.create(width, height);
|
849
|
-
var line = this.svgFactory.createElement('svg:line');
|
850
|
-
line.setAttribute('x1', data.rect[2] - data.lineCoordinates[0]);
|
851
|
-
line.setAttribute('y1', data.rect[3] - data.lineCoordinates[1]);
|
852
|
-
line.setAttribute('x2', data.rect[2] - data.lineCoordinates[2]);
|
853
|
-
line.setAttribute('y2', data.rect[3] - data.lineCoordinates[3]);
|
854
|
-
line.setAttribute('stroke-width', data.borderStyle.width);
|
855
|
-
line.setAttribute('stroke', 'transparent');
|
856
|
-
svg.appendChild(line);
|
857
|
-
this.container.append(svg);
|
858
|
-
|
859
|
-
this._createPopup(this.container, line, data);
|
660
|
+
_show(pin = false) {
|
661
|
+
if (pin) {
|
662
|
+
this.pinned = true;
|
663
|
+
}
|
860
664
|
|
861
|
-
|
665
|
+
if (this.hideElement.hasAttribute("hidden")) {
|
666
|
+
this.hideElement.removeAttribute("hidden");
|
667
|
+
this.container.style.zIndex += 1;
|
862
668
|
}
|
863
|
-
}
|
669
|
+
}
|
864
670
|
|
865
|
-
|
866
|
-
|
671
|
+
_hide(unpin = true) {
|
672
|
+
if (unpin) {
|
673
|
+
this.pinned = false;
|
674
|
+
}
|
867
675
|
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
676
|
+
if (!this.hideElement.hasAttribute("hidden") && !this.pinned) {
|
677
|
+
this.hideElement.setAttribute("hidden", true);
|
678
|
+
this.container.style.zIndex -= 1;
|
679
|
+
}
|
680
|
+
}
|
872
681
|
|
873
|
-
|
874
|
-
_classCallCheck(this, SquareAnnotationElement);
|
682
|
+
}
|
875
683
|
|
876
|
-
|
877
|
-
|
684
|
+
class FreeTextAnnotationElement extends AnnotationElement {
|
685
|
+
constructor(parameters) {
|
686
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
687
|
+
super(parameters, isRenderable, true);
|
878
688
|
}
|
879
689
|
|
880
|
-
|
881
|
-
|
882
|
-
value: function render() {
|
883
|
-
this.container.className = 'squareAnnotation';
|
884
|
-
var data = this.data;
|
885
|
-
var width = data.rect[2] - data.rect[0];
|
886
|
-
var height = data.rect[3] - data.rect[1];
|
887
|
-
var svg = this.svgFactory.create(width, height);
|
888
|
-
var borderWidth = data.borderStyle.width;
|
889
|
-
var square = this.svgFactory.createElement('svg:rect');
|
890
|
-
square.setAttribute('x', borderWidth / 2);
|
891
|
-
square.setAttribute('y', borderWidth / 2);
|
892
|
-
square.setAttribute('width', width - borderWidth);
|
893
|
-
square.setAttribute('height', height - borderWidth);
|
894
|
-
square.setAttribute('stroke-width', borderWidth);
|
895
|
-
square.setAttribute('stroke', 'transparent');
|
896
|
-
square.setAttribute('fill', 'none');
|
897
|
-
svg.appendChild(square);
|
898
|
-
this.container.append(svg);
|
899
|
-
|
900
|
-
this._createPopup(this.container, square, data);
|
690
|
+
render() {
|
691
|
+
this.container.className = "freeTextAnnotation";
|
901
692
|
|
902
|
-
|
693
|
+
if (!this.data.hasPopup) {
|
694
|
+
this._createPopup(this.container, null, this.data);
|
903
695
|
}
|
904
|
-
}]);
|
905
696
|
|
906
|
-
|
907
|
-
}
|
908
|
-
|
909
|
-
var CircleAnnotationElement =
|
910
|
-
/*#__PURE__*/
|
911
|
-
function (_AnnotationElement8) {
|
912
|
-
_inherits(CircleAnnotationElement, _AnnotationElement8);
|
697
|
+
return this.container;
|
698
|
+
}
|
913
699
|
|
914
|
-
|
915
|
-
_classCallCheck(this, CircleAnnotationElement);
|
700
|
+
}
|
916
701
|
|
917
|
-
|
918
|
-
|
702
|
+
class LineAnnotationElement extends AnnotationElement {
|
703
|
+
constructor(parameters) {
|
704
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
705
|
+
super(parameters, isRenderable, true);
|
919
706
|
}
|
920
707
|
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
this._createPopup(this.container, circle, data);
|
942
|
-
|
943
|
-
return this.container;
|
944
|
-
}
|
945
|
-
}]);
|
708
|
+
render() {
|
709
|
+
this.container.className = "lineAnnotation";
|
710
|
+
const data = this.data;
|
711
|
+
const width = data.rect[2] - data.rect[0];
|
712
|
+
const height = data.rect[3] - data.rect[1];
|
713
|
+
const svg = this.svgFactory.create(width, height);
|
714
|
+
const line = this.svgFactory.createElement("svg:line");
|
715
|
+
line.setAttribute("x1", data.rect[2] - data.lineCoordinates[0]);
|
716
|
+
line.setAttribute("y1", data.rect[3] - data.lineCoordinates[1]);
|
717
|
+
line.setAttribute("x2", data.rect[2] - data.lineCoordinates[2]);
|
718
|
+
line.setAttribute("y2", data.rect[3] - data.lineCoordinates[3]);
|
719
|
+
line.setAttribute("stroke-width", data.borderStyle.width || 1);
|
720
|
+
line.setAttribute("stroke", "transparent");
|
721
|
+
svg.appendChild(line);
|
722
|
+
this.container.append(svg);
|
723
|
+
|
724
|
+
this._createPopup(this.container, line, data);
|
725
|
+
|
726
|
+
return this.container;
|
727
|
+
}
|
946
728
|
|
947
|
-
|
948
|
-
}(AnnotationElement);
|
729
|
+
}
|
949
730
|
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
731
|
+
class SquareAnnotationElement extends AnnotationElement {
|
732
|
+
constructor(parameters) {
|
733
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
734
|
+
super(parameters, isRenderable, true);
|
735
|
+
}
|
954
736
|
|
955
|
-
|
956
|
-
|
737
|
+
render() {
|
738
|
+
this.container.className = "squareAnnotation";
|
739
|
+
const data = this.data;
|
740
|
+
const width = data.rect[2] - data.rect[0];
|
741
|
+
const height = data.rect[3] - data.rect[1];
|
742
|
+
const svg = this.svgFactory.create(width, height);
|
743
|
+
const borderWidth = data.borderStyle.width;
|
744
|
+
const square = this.svgFactory.createElement("svg:rect");
|
745
|
+
square.setAttribute("x", borderWidth / 2);
|
746
|
+
square.setAttribute("y", borderWidth / 2);
|
747
|
+
square.setAttribute("width", width - borderWidth);
|
748
|
+
square.setAttribute("height", height - borderWidth);
|
749
|
+
square.setAttribute("stroke-width", borderWidth || 1);
|
750
|
+
square.setAttribute("stroke", "transparent");
|
751
|
+
square.setAttribute("fill", "none");
|
752
|
+
svg.appendChild(square);
|
753
|
+
this.container.append(svg);
|
754
|
+
|
755
|
+
this._createPopup(this.container, square, data);
|
756
|
+
|
757
|
+
return this.container;
|
758
|
+
}
|
957
759
|
|
958
|
-
|
760
|
+
}
|
959
761
|
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
return _this3;
|
762
|
+
class CircleAnnotationElement extends AnnotationElement {
|
763
|
+
constructor(parameters) {
|
764
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
765
|
+
super(parameters, isRenderable, true);
|
965
766
|
}
|
966
767
|
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
768
|
+
render() {
|
769
|
+
this.container.className = "circleAnnotation";
|
770
|
+
const data = this.data;
|
771
|
+
const width = data.rect[2] - data.rect[0];
|
772
|
+
const height = data.rect[3] - data.rect[1];
|
773
|
+
const svg = this.svgFactory.create(width, height);
|
774
|
+
const borderWidth = data.borderStyle.width;
|
775
|
+
const circle = this.svgFactory.createElement("svg:ellipse");
|
776
|
+
circle.setAttribute("cx", width / 2);
|
777
|
+
circle.setAttribute("cy", height / 2);
|
778
|
+
circle.setAttribute("rx", width / 2 - borderWidth / 2);
|
779
|
+
circle.setAttribute("ry", height / 2 - borderWidth / 2);
|
780
|
+
circle.setAttribute("stroke-width", borderWidth || 1);
|
781
|
+
circle.setAttribute("stroke", "transparent");
|
782
|
+
circle.setAttribute("fill", "none");
|
783
|
+
svg.appendChild(circle);
|
784
|
+
this.container.append(svg);
|
785
|
+
|
786
|
+
this._createPopup(this.container, circle, data);
|
787
|
+
|
788
|
+
return this.container;
|
789
|
+
}
|
983
790
|
|
984
|
-
|
985
|
-
var borderWidth = data.borderStyle.width;
|
986
|
-
var polyline = this.svgFactory.createElement(this.svgElementName);
|
987
|
-
polyline.setAttribute('points', points);
|
988
|
-
polyline.setAttribute('stroke-width', borderWidth);
|
989
|
-
polyline.setAttribute('stroke', 'transparent');
|
990
|
-
polyline.setAttribute('fill', 'none');
|
991
|
-
svg.appendChild(polyline);
|
992
|
-
this.container.append(svg);
|
791
|
+
}
|
993
792
|
|
994
|
-
|
793
|
+
class PolylineAnnotationElement extends AnnotationElement {
|
794
|
+
constructor(parameters) {
|
795
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
796
|
+
super(parameters, isRenderable, true);
|
797
|
+
this.containerClassName = "polylineAnnotation";
|
798
|
+
this.svgElementName = "svg:polyline";
|
799
|
+
}
|
995
800
|
|
996
|
-
|
801
|
+
render() {
|
802
|
+
this.container.className = this.containerClassName;
|
803
|
+
const data = this.data;
|
804
|
+
const width = data.rect[2] - data.rect[0];
|
805
|
+
const height = data.rect[3] - data.rect[1];
|
806
|
+
const svg = this.svgFactory.create(width, height);
|
807
|
+
let points = [];
|
808
|
+
|
809
|
+
for (const coordinate of data.vertices) {
|
810
|
+
const x = coordinate.x - data.rect[0];
|
811
|
+
const y = data.rect[3] - coordinate.y;
|
812
|
+
points.push(x + "," + y);
|
997
813
|
}
|
998
|
-
}]);
|
999
814
|
|
1000
|
-
|
1001
|
-
|
815
|
+
points = points.join(" ");
|
816
|
+
const polyline = this.svgFactory.createElement(this.svgElementName);
|
817
|
+
polyline.setAttribute("points", points);
|
818
|
+
polyline.setAttribute("stroke-width", data.borderStyle.width || 1);
|
819
|
+
polyline.setAttribute("stroke", "transparent");
|
820
|
+
polyline.setAttribute("fill", "none");
|
821
|
+
svg.appendChild(polyline);
|
822
|
+
this.container.append(svg);
|
1002
823
|
|
1003
|
-
|
1004
|
-
/*#__PURE__*/
|
1005
|
-
function (_PolylineAnnotationEl) {
|
1006
|
-
_inherits(PolygonAnnotationElement, _PolylineAnnotationEl);
|
824
|
+
this._createPopup(this.container, polyline, data);
|
1007
825
|
|
1008
|
-
|
1009
|
-
var _this4;
|
1010
|
-
|
1011
|
-
_classCallCheck(this, PolygonAnnotationElement);
|
1012
|
-
|
1013
|
-
_this4 = _possibleConstructorReturn(this, _getPrototypeOf(PolygonAnnotationElement).call(this, parameters));
|
1014
|
-
_this4.containerClassName = 'polygonAnnotation';
|
1015
|
-
_this4.svgElementName = 'svg:polygon';
|
1016
|
-
return _this4;
|
826
|
+
return this.container;
|
1017
827
|
}
|
1018
828
|
|
1019
|
-
|
1020
|
-
}(PolylineAnnotationElement);
|
829
|
+
}
|
1021
830
|
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
831
|
+
class PolygonAnnotationElement extends PolylineAnnotationElement {
|
832
|
+
constructor(parameters) {
|
833
|
+
super(parameters);
|
834
|
+
this.containerClassName = "polygonAnnotation";
|
835
|
+
this.svgElementName = "svg:polygon";
|
836
|
+
}
|
1026
837
|
|
1027
|
-
|
1028
|
-
_classCallCheck(this, CaretAnnotationElement);
|
838
|
+
}
|
1029
839
|
|
1030
|
-
|
1031
|
-
|
840
|
+
class CaretAnnotationElement extends AnnotationElement {
|
841
|
+
constructor(parameters) {
|
842
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
843
|
+
super(parameters, isRenderable, true);
|
1032
844
|
}
|
1033
845
|
|
1034
|
-
|
1035
|
-
|
1036
|
-
value: function render() {
|
1037
|
-
this.container.className = 'caretAnnotation';
|
846
|
+
render() {
|
847
|
+
this.container.className = "caretAnnotation";
|
1038
848
|
|
1039
|
-
|
1040
|
-
|
1041
|
-
}
|
1042
|
-
|
1043
|
-
return this.container;
|
849
|
+
if (!this.data.hasPopup) {
|
850
|
+
this._createPopup(this.container, null, this.data);
|
1044
851
|
}
|
1045
|
-
}]);
|
1046
|
-
|
1047
|
-
return CaretAnnotationElement;
|
1048
|
-
}(AnnotationElement);
|
1049
852
|
|
1050
|
-
|
1051
|
-
|
1052
|
-
function (_AnnotationElement11) {
|
1053
|
-
_inherits(InkAnnotationElement, _AnnotationElement11);
|
1054
|
-
|
1055
|
-
function InkAnnotationElement(parameters) {
|
1056
|
-
var _this5;
|
853
|
+
return this.container;
|
854
|
+
}
|
1057
855
|
|
1058
|
-
|
856
|
+
}
|
1059
857
|
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
858
|
+
class InkAnnotationElement extends AnnotationElement {
|
859
|
+
constructor(parameters) {
|
860
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
861
|
+
super(parameters, isRenderable, true);
|
862
|
+
this.containerClassName = "inkAnnotation";
|
863
|
+
this.svgElementName = "svg:polyline";
|
1065
864
|
}
|
1066
865
|
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
var height = data.rect[3] - data.rect[1];
|
1074
|
-
var svg = this.svgFactory.create(width, height);
|
1075
|
-
var inkLists = data.inkLists;
|
1076
|
-
|
1077
|
-
for (var i = 0, ii = inkLists.length; i < ii; i++) {
|
1078
|
-
var inkList = inkLists[i];
|
1079
|
-
var points = [];
|
1080
|
-
|
1081
|
-
for (var j = 0, jj = inkList.length; j < jj; j++) {
|
1082
|
-
var x = inkList[j].x - data.rect[0];
|
1083
|
-
var y = data.rect[3] - inkList[j].y;
|
1084
|
-
points.push(x + ',' + y);
|
1085
|
-
}
|
1086
|
-
|
1087
|
-
points = points.join(' ');
|
1088
|
-
var borderWidth = data.borderStyle.width;
|
1089
|
-
var polyline = this.svgFactory.createElement(this.svgElementName);
|
1090
|
-
polyline.setAttribute('points', points);
|
1091
|
-
polyline.setAttribute('stroke-width', borderWidth);
|
1092
|
-
polyline.setAttribute('stroke', 'transparent');
|
1093
|
-
polyline.setAttribute('fill', 'none');
|
866
|
+
render() {
|
867
|
+
this.container.className = this.containerClassName;
|
868
|
+
const data = this.data;
|
869
|
+
const width = data.rect[2] - data.rect[0];
|
870
|
+
const height = data.rect[3] - data.rect[1];
|
871
|
+
const svg = this.svgFactory.create(width, height);
|
1094
872
|
|
1095
|
-
|
873
|
+
for (const inkList of data.inkLists) {
|
874
|
+
let points = [];
|
1096
875
|
|
1097
|
-
|
876
|
+
for (const coordinate of inkList) {
|
877
|
+
const x = coordinate.x - data.rect[0];
|
878
|
+
const y = data.rect[3] - coordinate.y;
|
879
|
+
points.push(`${x},${y}`);
|
1098
880
|
}
|
1099
881
|
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
}(AnnotationElement);
|
882
|
+
points = points.join(" ");
|
883
|
+
const polyline = this.svgFactory.createElement(this.svgElementName);
|
884
|
+
polyline.setAttribute("points", points);
|
885
|
+
polyline.setAttribute("stroke-width", data.borderStyle.width || 1);
|
886
|
+
polyline.setAttribute("stroke", "transparent");
|
887
|
+
polyline.setAttribute("fill", "none");
|
1107
888
|
|
1108
|
-
|
1109
|
-
/*#__PURE__*/
|
1110
|
-
function (_AnnotationElement12) {
|
1111
|
-
_inherits(HighlightAnnotationElement, _AnnotationElement12);
|
889
|
+
this._createPopup(this.container, polyline, data);
|
1112
890
|
|
1113
|
-
|
1114
|
-
|
891
|
+
svg.appendChild(polyline);
|
892
|
+
}
|
1115
893
|
|
1116
|
-
|
1117
|
-
return
|
894
|
+
this.container.append(svg);
|
895
|
+
return this.container;
|
1118
896
|
}
|
1119
897
|
|
1120
|
-
|
1121
|
-
key: "render",
|
1122
|
-
value: function render() {
|
1123
|
-
this.container.className = 'highlightAnnotation';
|
898
|
+
}
|
1124
899
|
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
900
|
+
class HighlightAnnotationElement extends AnnotationElement {
|
901
|
+
constructor(parameters) {
|
902
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
903
|
+
super(parameters, isRenderable, true);
|
904
|
+
}
|
1128
905
|
|
1129
|
-
|
1130
|
-
|
1131
|
-
}]);
|
906
|
+
render() {
|
907
|
+
this.container.className = "highlightAnnotation";
|
1132
908
|
|
1133
|
-
|
1134
|
-
|
909
|
+
if (!this.data.hasPopup) {
|
910
|
+
this._createPopup(this.container, null, this.data);
|
911
|
+
}
|
1135
912
|
|
1136
|
-
|
1137
|
-
|
1138
|
-
function (_AnnotationElement13) {
|
1139
|
-
_inherits(UnderlineAnnotationElement, _AnnotationElement13);
|
913
|
+
return this.container;
|
914
|
+
}
|
1140
915
|
|
1141
|
-
|
1142
|
-
_classCallCheck(this, UnderlineAnnotationElement);
|
916
|
+
}
|
1143
917
|
|
1144
|
-
|
1145
|
-
|
918
|
+
class UnderlineAnnotationElement extends AnnotationElement {
|
919
|
+
constructor(parameters) {
|
920
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
921
|
+
super(parameters, isRenderable, true);
|
1146
922
|
}
|
1147
923
|
|
1148
|
-
|
1149
|
-
|
1150
|
-
value: function render() {
|
1151
|
-
this.container.className = 'underlineAnnotation';
|
1152
|
-
|
1153
|
-
if (!this.data.hasPopup) {
|
1154
|
-
this._createPopup(this.container, null, this.data);
|
1155
|
-
}
|
924
|
+
render() {
|
925
|
+
this.container.className = "underlineAnnotation";
|
1156
926
|
|
1157
|
-
|
927
|
+
if (!this.data.hasPopup) {
|
928
|
+
this._createPopup(this.container, null, this.data);
|
1158
929
|
}
|
1159
|
-
}]);
|
1160
930
|
|
1161
|
-
|
1162
|
-
}
|
1163
|
-
|
1164
|
-
var SquigglyAnnotationElement =
|
1165
|
-
/*#__PURE__*/
|
1166
|
-
function (_AnnotationElement14) {
|
1167
|
-
_inherits(SquigglyAnnotationElement, _AnnotationElement14);
|
931
|
+
return this.container;
|
932
|
+
}
|
1168
933
|
|
1169
|
-
|
1170
|
-
_classCallCheck(this, SquigglyAnnotationElement);
|
934
|
+
}
|
1171
935
|
|
1172
|
-
|
1173
|
-
|
936
|
+
class SquigglyAnnotationElement extends AnnotationElement {
|
937
|
+
constructor(parameters) {
|
938
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
939
|
+
super(parameters, isRenderable, true);
|
1174
940
|
}
|
1175
941
|
|
1176
|
-
|
1177
|
-
|
1178
|
-
value: function render() {
|
1179
|
-
this.container.className = 'squigglyAnnotation';
|
942
|
+
render() {
|
943
|
+
this.container.className = "squigglyAnnotation";
|
1180
944
|
|
1181
|
-
|
1182
|
-
|
1183
|
-
}
|
1184
|
-
|
1185
|
-
return this.container;
|
945
|
+
if (!this.data.hasPopup) {
|
946
|
+
this._createPopup(this.container, null, this.data);
|
1186
947
|
}
|
1187
|
-
}]);
|
1188
948
|
|
1189
|
-
|
1190
|
-
}
|
1191
|
-
|
1192
|
-
var StrikeOutAnnotationElement =
|
1193
|
-
/*#__PURE__*/
|
1194
|
-
function (_AnnotationElement15) {
|
1195
|
-
_inherits(StrikeOutAnnotationElement, _AnnotationElement15);
|
949
|
+
return this.container;
|
950
|
+
}
|
1196
951
|
|
1197
|
-
|
1198
|
-
_classCallCheck(this, StrikeOutAnnotationElement);
|
952
|
+
}
|
1199
953
|
|
1200
|
-
|
1201
|
-
|
954
|
+
class StrikeOutAnnotationElement extends AnnotationElement {
|
955
|
+
constructor(parameters) {
|
956
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
957
|
+
super(parameters, isRenderable, true);
|
1202
958
|
}
|
1203
959
|
|
1204
|
-
|
1205
|
-
|
1206
|
-
value: function render() {
|
1207
|
-
this.container.className = 'strikeoutAnnotation';
|
1208
|
-
|
1209
|
-
if (!this.data.hasPopup) {
|
1210
|
-
this._createPopup(this.container, null, this.data);
|
1211
|
-
}
|
960
|
+
render() {
|
961
|
+
this.container.className = "strikeoutAnnotation";
|
1212
962
|
|
1213
|
-
|
963
|
+
if (!this.data.hasPopup) {
|
964
|
+
this._createPopup(this.container, null, this.data);
|
1214
965
|
}
|
1215
|
-
}]);
|
1216
|
-
|
1217
|
-
return StrikeOutAnnotationElement;
|
1218
|
-
}(AnnotationElement);
|
1219
966
|
|
1220
|
-
|
1221
|
-
|
1222
|
-
function (_AnnotationElement16) {
|
1223
|
-
_inherits(StampAnnotationElement, _AnnotationElement16);
|
967
|
+
return this.container;
|
968
|
+
}
|
1224
969
|
|
1225
|
-
|
1226
|
-
_classCallCheck(this, StampAnnotationElement);
|
970
|
+
}
|
1227
971
|
|
1228
|
-
|
1229
|
-
|
972
|
+
class StampAnnotationElement extends AnnotationElement {
|
973
|
+
constructor(parameters) {
|
974
|
+
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
|
975
|
+
super(parameters, isRenderable, true);
|
1230
976
|
}
|
1231
977
|
|
1232
|
-
|
1233
|
-
|
1234
|
-
value: function render() {
|
1235
|
-
this.container.className = 'stampAnnotation';
|
978
|
+
render() {
|
979
|
+
this.container.className = "stampAnnotation";
|
1236
980
|
|
1237
|
-
|
1238
|
-
|
1239
|
-
}
|
1240
|
-
|
1241
|
-
return this.container;
|
981
|
+
if (!this.data.hasPopup) {
|
982
|
+
this._createPopup(this.container, null, this.data);
|
1242
983
|
}
|
1243
|
-
}]);
|
1244
984
|
|
1245
|
-
|
1246
|
-
}
|
985
|
+
return this.container;
|
986
|
+
}
|
1247
987
|
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
988
|
+
}
|
989
|
+
|
990
|
+
class FileAttachmentAnnotationElement extends AnnotationElement {
|
991
|
+
constructor(parameters) {
|
992
|
+
super(parameters, true);
|
993
|
+
const {
|
994
|
+
filename,
|
995
|
+
content
|
996
|
+
} = this.data.file;
|
997
|
+
this.filename = (0, _display_utils.getFilenameFromUrl)(filename);
|
998
|
+
this.content = content;
|
999
|
+
|
1000
|
+
if (this.linkService.eventBus) {
|
1001
|
+
this.linkService.eventBus.dispatch("fileattachmentannotation", {
|
1002
|
+
source: this,
|
1003
|
+
id: (0, _util.stringToPDFString)(filename),
|
1004
|
+
filename,
|
1005
|
+
content
|
1006
|
+
});
|
1007
|
+
}
|
1008
|
+
}
|
1252
1009
|
|
1253
|
-
|
1254
|
-
|
1010
|
+
render() {
|
1011
|
+
this.container.className = "fileAttachmentAnnotation";
|
1012
|
+
const trigger = document.createElement("div");
|
1013
|
+
trigger.style.height = this.container.style.height;
|
1014
|
+
trigger.style.width = this.container.style.width;
|
1015
|
+
trigger.addEventListener("dblclick", this._download.bind(this));
|
1255
1016
|
|
1256
|
-
|
1017
|
+
if (!this.data.hasPopup && (this.data.title || this.data.contents)) {
|
1018
|
+
this._createPopup(this.container, trigger, this.data);
|
1019
|
+
}
|
1257
1020
|
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
content = _this6$data$file.content;
|
1262
|
-
_this6.filename = (0, _display_utils.getFilenameFromUrl)(filename);
|
1263
|
-
_this6.content = content;
|
1021
|
+
this.container.appendChild(trigger);
|
1022
|
+
return this.container;
|
1023
|
+
}
|
1264
1024
|
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
filename: filename,
|
1270
|
-
content: content
|
1271
|
-
});
|
1025
|
+
_download() {
|
1026
|
+
if (!this.downloadManager) {
|
1027
|
+
(0, _util.warn)("Download cannot be started due to unavailable download manager");
|
1028
|
+
return;
|
1272
1029
|
}
|
1273
1030
|
|
1274
|
-
|
1031
|
+
this.downloadManager.downloadData(this.content, this.filename, "");
|
1275
1032
|
}
|
1276
1033
|
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
this._createPopup(this.container, trigger, this.data);
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
class AnnotationLayer {
|
1037
|
+
static render(parameters) {
|
1038
|
+
const sortedAnnotations = [],
|
1039
|
+
popupAnnotations = [];
|
1040
|
+
|
1041
|
+
for (const data of parameters.annotations) {
|
1042
|
+
if (!data) {
|
1043
|
+
continue;
|
1288
1044
|
}
|
1289
1045
|
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
}, {
|
1294
|
-
key: "_download",
|
1295
|
-
value: function _download() {
|
1296
|
-
if (!this.downloadManager) {
|
1297
|
-
(0, _util.warn)('Download cannot be started due to unavailable download manager');
|
1298
|
-
return;
|
1046
|
+
if (data.annotationType === _util.AnnotationType.POPUP) {
|
1047
|
+
popupAnnotations.push(data);
|
1048
|
+
continue;
|
1299
1049
|
}
|
1300
1050
|
|
1301
|
-
|
1051
|
+
sortedAnnotations.push(data);
|
1302
1052
|
}
|
1303
|
-
}]);
|
1304
1053
|
|
1305
|
-
|
1306
|
-
|
1054
|
+
if (popupAnnotations.length) {
|
1055
|
+
sortedAnnotations.push(...popupAnnotations);
|
1056
|
+
}
|
1307
1057
|
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1058
|
+
for (const data of sortedAnnotations) {
|
1059
|
+
const element = AnnotationElementFactory.create({
|
1060
|
+
data,
|
1061
|
+
layer: parameters.div,
|
1062
|
+
page: parameters.page,
|
1063
|
+
viewport: parameters.viewport,
|
1064
|
+
linkService: parameters.linkService,
|
1065
|
+
downloadManager: parameters.downloadManager,
|
1066
|
+
imageResourcesPath: parameters.imageResourcesPath || "",
|
1067
|
+
renderInteractiveForms: typeof parameters.renderInteractiveForms === "boolean" ? parameters.renderInteractiveForms : true,
|
1068
|
+
svgFactory: new _display_utils.DOMSVGFactory(),
|
1069
|
+
annotationStorage: parameters.annotationStorage || new _annotation_storage.AnnotationStorage()
|
1070
|
+
});
|
1314
1071
|
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1072
|
+
if (element.isRenderable) {
|
1073
|
+
parameters.div.appendChild(element.render());
|
1074
|
+
}
|
1075
|
+
}
|
1076
|
+
}
|
1320
1077
|
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1078
|
+
static update(parameters) {
|
1079
|
+
for (const data of parameters.annotations) {
|
1080
|
+
const element = parameters.div.querySelector(`[data-annotation-id="${data.id}"]`);
|
1324
1081
|
|
1325
|
-
|
1326
|
-
|
1327
|
-
layer: parameters.div,
|
1328
|
-
page: parameters.page,
|
1329
|
-
viewport: parameters.viewport,
|
1330
|
-
linkService: parameters.linkService,
|
1331
|
-
downloadManager: parameters.downloadManager,
|
1332
|
-
imageResourcesPath: parameters.imageResourcesPath || '',
|
1333
|
-
renderInteractiveForms: parameters.renderInteractiveForms || false,
|
1334
|
-
svgFactory: new _display_utils.DOMSVGFactory()
|
1335
|
-
});
|
1336
|
-
|
1337
|
-
if (element.isRenderable) {
|
1338
|
-
parameters.div.appendChild(element.render());
|
1339
|
-
}
|
1082
|
+
if (element) {
|
1083
|
+
element.style.transform = `matrix(${parameters.viewport.transform.join(",")})`;
|
1340
1084
|
}
|
1341
1085
|
}
|
1342
|
-
}, {
|
1343
|
-
key: "update",
|
1344
|
-
value: function update(parameters) {
|
1345
|
-
for (var i = 0, ii = parameters.annotations.length; i < ii; i++) {
|
1346
|
-
var data = parameters.annotations[i];
|
1347
|
-
var element = parameters.div.querySelector('[data-annotation-id="' + data.id + '"]');
|
1348
|
-
|
1349
|
-
if (element) {
|
1350
|
-
element.style.transform = 'matrix(' + parameters.viewport.transform.join(',') + ')';
|
1351
|
-
}
|
1352
|
-
}
|
1353
1086
|
|
1354
|
-
|
1355
|
-
|
1356
|
-
}]);
|
1087
|
+
parameters.div.removeAttribute("hidden");
|
1088
|
+
}
|
1357
1089
|
|
1358
|
-
|
1359
|
-
}();
|
1090
|
+
}
|
1360
1091
|
|
1361
1092
|
exports.AnnotationLayer = AnnotationLayer;
|