mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Implement support for Highlight annotations
This commit is contained in:
parent
8ed369211a
commit
6ef7120a04
6 changed files with 58 additions and 0 deletions
|
@ -72,6 +72,9 @@ AnnotationElementFactory.prototype =
|
|||
case AnnotationType.POPUP:
|
||||
return new PopupAnnotationElement(parameters);
|
||||
|
||||
case AnnotationType.HIGHLIGHT:
|
||||
return new HighlightAnnotationElement(parameters);
|
||||
|
||||
case AnnotationType.UNDERLINE:
|
||||
return new UnderlineAnnotationElement(parameters);
|
||||
|
||||
|
@ -609,6 +612,33 @@ var PopupElement = (function PopupElementClosure() {
|
|||
return PopupElement;
|
||||
})();
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @alias HighlightAnnotationElement
|
||||
*/
|
||||
var HighlightAnnotationElement = (
|
||||
function HighlightAnnotationElementClosure() {
|
||||
function HighlightAnnotationElement(parameters) {
|
||||
AnnotationElement.call(this, parameters);
|
||||
}
|
||||
|
||||
Util.inherit(HighlightAnnotationElement, AnnotationElement, {
|
||||
/**
|
||||
* Render the highlight annotation's HTML element in the empty container.
|
||||
*
|
||||
* @public
|
||||
* @memberof HighlightAnnotationElement
|
||||
* @returns {HTMLSectionElement}
|
||||
*/
|
||||
render: function HighlightAnnotationElement_render() {
|
||||
this.container.className = 'highlightAnnotation';
|
||||
return this.container;
|
||||
}
|
||||
});
|
||||
|
||||
return HighlightAnnotationElement;
|
||||
})();
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @alias UnderlineAnnotationElement
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue