mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Implement support for Squiggly annotations
This commit is contained in:
parent
d956177482
commit
34918a6666
6 changed files with 58 additions and 4 deletions
|
@ -75,6 +75,9 @@ AnnotationElementFactory.prototype =
|
|||
case AnnotationType.UNDERLINE:
|
||||
return new UnderlineAnnotationElement(parameters);
|
||||
|
||||
case AnnotationType.SQUIGGLY:
|
||||
return new SquigglyAnnotationElement(parameters);
|
||||
|
||||
case AnnotationType.STRIKEOUT:
|
||||
return new StrikeOutAnnotationElement(parameters);
|
||||
|
||||
|
@ -633,6 +636,32 @@ var UnderlineAnnotationElement = (
|
|||
return UnderlineAnnotationElement;
|
||||
})();
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @alias SquigglyAnnotationElement
|
||||
*/
|
||||
var SquigglyAnnotationElement = (function SquigglyAnnotationElementClosure() {
|
||||
function SquigglyAnnotationElement(parameters) {
|
||||
AnnotationElement.call(this, parameters);
|
||||
}
|
||||
|
||||
Util.inherit(SquigglyAnnotationElement, AnnotationElement, {
|
||||
/**
|
||||
* Render the squiggly annotation's HTML element in the empty container.
|
||||
*
|
||||
* @public
|
||||
* @memberof SquigglyAnnotationElement
|
||||
* @returns {HTMLSectionElement}
|
||||
*/
|
||||
render: function SquigglyAnnotationElement_render() {
|
||||
this.container.className = 'squigglyAnnotation';
|
||||
return this.container;
|
||||
}
|
||||
});
|
||||
|
||||
return SquigglyAnnotationElement;
|
||||
})();
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @alias StrikeOutAnnotationElement
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue