Merge pull request #7012 from KamiHQ/fix-annotation-popup
don't render highlight/underline/squiggly/strikeout annotations that doesn't have popup
This commit is contained in:
commit
ebe6fb2560
@ -797,6 +797,7 @@ var HighlightAnnotation = (function HighlightAnnotationClosure() {
|
|||||||
Annotation.call(this, parameters);
|
Annotation.call(this, parameters);
|
||||||
|
|
||||||
this.data.annotationType = AnnotationType.HIGHLIGHT;
|
this.data.annotationType = AnnotationType.HIGHLIGHT;
|
||||||
|
this.data.hasPopup = parameters.dict.has('Popup');
|
||||||
|
|
||||||
// PDF viewers completely ignore any border styles.
|
// PDF viewers completely ignore any border styles.
|
||||||
this.data.borderStyle.setWidth(0);
|
this.data.borderStyle.setWidth(0);
|
||||||
@ -812,6 +813,7 @@ var UnderlineAnnotation = (function UnderlineAnnotationClosure() {
|
|||||||
Annotation.call(this, parameters);
|
Annotation.call(this, parameters);
|
||||||
|
|
||||||
this.data.annotationType = AnnotationType.UNDERLINE;
|
this.data.annotationType = AnnotationType.UNDERLINE;
|
||||||
|
this.data.hasPopup = parameters.dict.has('Popup');
|
||||||
|
|
||||||
// PDF viewers completely ignore any border styles.
|
// PDF viewers completely ignore any border styles.
|
||||||
this.data.borderStyle.setWidth(0);
|
this.data.borderStyle.setWidth(0);
|
||||||
@ -827,6 +829,7 @@ var SquigglyAnnotation = (function SquigglyAnnotationClosure() {
|
|||||||
Annotation.call(this, parameters);
|
Annotation.call(this, parameters);
|
||||||
|
|
||||||
this.data.annotationType = AnnotationType.SQUIGGLY;
|
this.data.annotationType = AnnotationType.SQUIGGLY;
|
||||||
|
this.data.hasPopup = parameters.dict.has('Popup');
|
||||||
|
|
||||||
// PDF viewers completely ignore any border styles.
|
// PDF viewers completely ignore any border styles.
|
||||||
this.data.borderStyle.setWidth(0);
|
this.data.borderStyle.setWidth(0);
|
||||||
@ -842,6 +845,7 @@ var StrikeOutAnnotation = (function StrikeOutAnnotationClosure() {
|
|||||||
Annotation.call(this, parameters);
|
Annotation.call(this, parameters);
|
||||||
|
|
||||||
this.data.annotationType = AnnotationType.STRIKEOUT;
|
this.data.annotationType = AnnotationType.STRIKEOUT;
|
||||||
|
this.data.hasPopup = parameters.dict.has('Popup');
|
||||||
|
|
||||||
// PDF viewers completely ignore any border styles.
|
// PDF viewers completely ignore any border styles.
|
||||||
this.data.borderStyle.setWidth(0);
|
this.data.borderStyle.setWidth(0);
|
||||||
|
@ -617,7 +617,8 @@ var PopupElement = (function PopupElementClosure() {
|
|||||||
var HighlightAnnotationElement = (
|
var HighlightAnnotationElement = (
|
||||||
function HighlightAnnotationElementClosure() {
|
function HighlightAnnotationElementClosure() {
|
||||||
function HighlightAnnotationElement(parameters) {
|
function HighlightAnnotationElement(parameters) {
|
||||||
AnnotationElement.call(this, parameters, true);
|
var isRenderable = parameters.data.hasPopup;
|
||||||
|
AnnotationElement.call(this, parameters, isRenderable);
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.inherit(HighlightAnnotationElement, AnnotationElement, {
|
Util.inherit(HighlightAnnotationElement, AnnotationElement, {
|
||||||
@ -644,7 +645,8 @@ var HighlightAnnotationElement = (
|
|||||||
var UnderlineAnnotationElement = (
|
var UnderlineAnnotationElement = (
|
||||||
function UnderlineAnnotationElementClosure() {
|
function UnderlineAnnotationElementClosure() {
|
||||||
function UnderlineAnnotationElement(parameters) {
|
function UnderlineAnnotationElement(parameters) {
|
||||||
AnnotationElement.call(this, parameters, true);
|
var isRenderable = parameters.data.hasPopup;
|
||||||
|
AnnotationElement.call(this, parameters, isRenderable);
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.inherit(UnderlineAnnotationElement, AnnotationElement, {
|
Util.inherit(UnderlineAnnotationElement, AnnotationElement, {
|
||||||
@ -670,7 +672,8 @@ var UnderlineAnnotationElement = (
|
|||||||
*/
|
*/
|
||||||
var SquigglyAnnotationElement = (function SquigglyAnnotationElementClosure() {
|
var SquigglyAnnotationElement = (function SquigglyAnnotationElementClosure() {
|
||||||
function SquigglyAnnotationElement(parameters) {
|
function SquigglyAnnotationElement(parameters) {
|
||||||
AnnotationElement.call(this, parameters, true);
|
var isRenderable = parameters.data.hasPopup;
|
||||||
|
AnnotationElement.call(this, parameters, isRenderable);
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.inherit(SquigglyAnnotationElement, AnnotationElement, {
|
Util.inherit(SquigglyAnnotationElement, AnnotationElement, {
|
||||||
@ -697,7 +700,8 @@ var SquigglyAnnotationElement = (function SquigglyAnnotationElementClosure() {
|
|||||||
var StrikeOutAnnotationElement = (
|
var StrikeOutAnnotationElement = (
|
||||||
function StrikeOutAnnotationElementClosure() {
|
function StrikeOutAnnotationElementClosure() {
|
||||||
function StrikeOutAnnotationElement(parameters) {
|
function StrikeOutAnnotationElement(parameters) {
|
||||||
AnnotationElement.call(this, parameters, true);
|
var isRenderable = parameters.data.hasPopup;
|
||||||
|
AnnotationElement.call(this, parameters, isRenderable);
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.inherit(StrikeOutAnnotationElement, AnnotationElement, {
|
Util.inherit(StrikeOutAnnotationElement, AnnotationElement, {
|
||||||
|
Loading…
Reference in New Issue
Block a user