|
|
@ -45,6 +45,8 @@ var getDefaultSetting = displayDOMUtils.getDefaultSetting; |
|
|
|
* @property {PageViewport} viewport |
|
|
|
* @property {PageViewport} viewport |
|
|
|
* @property {IPDFLinkService} linkService |
|
|
|
* @property {IPDFLinkService} linkService |
|
|
|
* @property {DownloadManager} downloadManager |
|
|
|
* @property {DownloadManager} downloadManager |
|
|
|
|
|
|
|
* @property {string} imageResourcesPath |
|
|
|
|
|
|
|
* @property {boolean} renderInteractiveForms |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -115,6 +117,7 @@ var AnnotationElement = (function AnnotationElementClosure() { |
|
|
|
this.linkService = parameters.linkService; |
|
|
|
this.linkService = parameters.linkService; |
|
|
|
this.downloadManager = parameters.downloadManager; |
|
|
|
this.downloadManager = parameters.downloadManager; |
|
|
|
this.imageResourcesPath = parameters.imageResourcesPath; |
|
|
|
this.imageResourcesPath = parameters.imageResourcesPath; |
|
|
|
|
|
|
|
this.renderInteractiveForms = parameters.renderInteractiveForms; |
|
|
|
|
|
|
|
|
|
|
|
if (isRenderable) { |
|
|
|
if (isRenderable) { |
|
|
|
this.container = this._createContainer(); |
|
|
|
this.container = this._createContainer(); |
|
|
@ -437,6 +440,15 @@ var TextWidgetAnnotationElement = ( |
|
|
|
* @returns {HTMLSectionElement} |
|
|
|
* @returns {HTMLSectionElement} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
render: function TextWidgetAnnotationElement_render() { |
|
|
|
render: function TextWidgetAnnotationElement_render() { |
|
|
|
|
|
|
|
this.container.className = 'textWidgetAnnotation'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.renderInteractiveForms) { |
|
|
|
|
|
|
|
var input = document.createElement('input'); |
|
|
|
|
|
|
|
input.type = 'text'; |
|
|
|
|
|
|
|
input.value = this.data.fieldValue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.container.appendChild(input); |
|
|
|
|
|
|
|
} else { |
|
|
|
var content = document.createElement('div'); |
|
|
|
var content = document.createElement('div'); |
|
|
|
content.textContent = this.data.fieldValue; |
|
|
|
content.textContent = this.data.fieldValue; |
|
|
|
var textAlignment = this.data.textAlignment; |
|
|
|
var textAlignment = this.data.textAlignment; |
|
|
@ -449,6 +461,7 @@ var TextWidgetAnnotationElement = ( |
|
|
|
this._setTextStyle(content, font); |
|
|
|
this._setTextStyle(content, font); |
|
|
|
|
|
|
|
|
|
|
|
this.container.appendChild(content); |
|
|
|
this.container.appendChild(content); |
|
|
|
|
|
|
|
} |
|
|
|
return this.container; |
|
|
|
return this.container; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -875,6 +888,7 @@ var FileAttachmentAnnotationElement = ( |
|
|
|
* @property {PDFPage} page |
|
|
|
* @property {PDFPage} page |
|
|
|
* @property {IPDFLinkService} linkService |
|
|
|
* @property {IPDFLinkService} linkService |
|
|
|
* @property {string} imageResourcesPath |
|
|
|
* @property {string} imageResourcesPath |
|
|
|
|
|
|
|
* @property {boolean} renderInteractiveForms |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -907,7 +921,8 @@ var AnnotationLayer = (function AnnotationLayerClosure() { |
|
|
|
linkService: parameters.linkService, |
|
|
|
linkService: parameters.linkService, |
|
|
|
downloadManager: parameters.downloadManager, |
|
|
|
downloadManager: parameters.downloadManager, |
|
|
|
imageResourcesPath: parameters.imageResourcesPath || |
|
|
|
imageResourcesPath: parameters.imageResourcesPath || |
|
|
|
getDefaultSetting('imageResourcesPath') |
|
|
|
getDefaultSetting('imageResourcesPath'), |
|
|
|
|
|
|
|
renderInteractiveForms: parameters.renderInteractiveForms || false, |
|
|
|
}; |
|
|
|
}; |
|
|
|
var element = annotationElementFactory.create(properties); |
|
|
|
var element = annotationElementFactory.create(properties); |
|
|
|
if (element.isRenderable) { |
|
|
|
if (element.isRenderable) { |
|
|
|