Merge pull request #17075 from calixteman/issue17069_followup
Add a HTML containter for locked FreeText annotations in order to be able to display a popup (follow-up of #17070)
This commit is contained in:
commit
a60f90ae94
@ -3724,6 +3724,8 @@ class FreeTextAnnotation extends MarkupAnnotation {
|
|||||||
// But if it has the noHTML flag, it means that we don't want to be able
|
// But if it has the noHTML flag, it means that we don't want to be able
|
||||||
// to modify it so we can just draw it on the main canvas.
|
// to modify it so we can just draw it on the main canvas.
|
||||||
this.data.hasOwnCanvas = !this.data.noHTML;
|
this.data.hasOwnCanvas = !this.data.noHTML;
|
||||||
|
// We want to be able to add mouse listeners to the annotation.
|
||||||
|
this.data.noHTML = false;
|
||||||
|
|
||||||
const { evaluatorOptions, xref } = params;
|
const { evaluatorOptions, xref } = params;
|
||||||
this.data.annotationType = AnnotationType.FREETEXT;
|
this.data.annotationType = AnnotationType.FREETEXT;
|
||||||
|
@ -671,7 +671,14 @@ class AnnotationElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get _isEditable() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_editOnDoubleClick() {
|
_editOnDoubleClick() {
|
||||||
|
if (!this._isEditable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const {
|
const {
|
||||||
annotationEditorType: mode,
|
annotationEditorType: mode,
|
||||||
data: { id: editId },
|
data: { id: editId },
|
||||||
@ -2347,6 +2354,10 @@ class FreeTextAnnotationElement extends AnnotationElement {
|
|||||||
|
|
||||||
return this.container;
|
return this.container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get _isEditable() {
|
||||||
|
return this.data.hasOwnCanvas;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LineAnnotationElement extends AnnotationElement {
|
class LineAnnotationElement extends AnnotationElement {
|
||||||
|
Loading…
Reference in New Issue
Block a user