|
@@ -46,7 +46,7 @@ class ComPDFAnnotationLayer {
|
|
|
$t
|
|
|
}) {
|
|
|
this.documentViewer = documentViewer
|
|
|
- this._cancelled = false;
|
|
|
+ this.annotationStore = annotationStore
|
|
|
this.pageViewer = pageViewer
|
|
|
this.pageDiv = pageDiv;
|
|
|
this.pdfPage = pdfPage;
|
|
@@ -58,6 +58,10 @@ class ComPDFAnnotationLayer {
|
|
|
this.scale = scale
|
|
|
this.eventBus = eventBus
|
|
|
this.page = pageIndex
|
|
|
+ this.annotationStore.$t = $t
|
|
|
+ this.enableReply = enableReply
|
|
|
+
|
|
|
+ this._cancelled = false
|
|
|
this.tool = pageViewer.tool || ''
|
|
|
this.color = pageViewer.color || ''
|
|
|
this.annotateManager = null
|
|
@@ -67,20 +71,14 @@ class ComPDFAnnotationLayer {
|
|
|
this.toolMode = pageViewer.toolMode || ''
|
|
|
this.managerArray = ['freetextManager', 'textManager', 'textFieldManager', 'checkBoxManager', 'radioButtonManager', 'pushButtonManager', 'listBoxManager', 'comboBoxManager', 'annotateManager', 'linkManager', 'signFieldManager', 'redactionManager']
|
|
|
this.ratio = window.devicePixelRatio || 1
|
|
|
-
|
|
|
- this.annotationStore = annotationStore
|
|
|
+ this.markupType = ['highlight', 'underline', 'squiggly', 'strikeout']
|
|
|
+ this.pageViewer.canvas && (this.ctx = this.pageViewer.canvas.getContext('2d'))
|
|
|
|
|
|
this.onHandleTool = this.handleTool.bind(this)
|
|
|
this.onHandleToolMode = this.handleToolMode.bind(this)
|
|
|
this.onHandlePropertyPanelChanged = this.handlePropertyPanelChanged.bind(this)
|
|
|
this.onHandleAddSign = this.addSign.bind(this)
|
|
|
this.onRedrawMarkups = this.redrawMarkups.bind(this)
|
|
|
-
|
|
|
- this.annotationStore.$t = $t
|
|
|
-
|
|
|
- this.enableReply = enableReply
|
|
|
- this.markupType = ['highlight', 'underline', 'squiggly', 'strikeout']
|
|
|
- this.ctx = this.pageViewer.canvas.getContext('2d')
|
|
|
}
|
|
|
|
|
|
// 处理注释工具切换
|