4 Commit-ok 0b1d157218 ... 2dbddcafdf

Szerző SHA1 Üzenet Dátum
  liutian 2dbddcafdf fix: 修复选中注释及删除注释 API 问题 3 hete
  liutian 245218c73e add: 注释支持跨页移动 2 hete
  liutian 0b1d157218 fix: 修复选中注释及删除注释 API 问题 3 hete
  liutian ec1ff0fe93 add: 注释支持跨页移动 2 hete

+ 0 - 1
packages/core/src/annotation/freetext.js

@@ -27,7 +27,6 @@ export default class Shape extends Base {
 
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.leftTop = null
     this.rightBottom = null

+ 0 - 1
packages/core/src/annotation/ink.js

@@ -27,7 +27,6 @@ export default class Ink extends Base {
 
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null

+ 0 - 1
packages/core/src/annotation/line.js

@@ -28,7 +28,6 @@ export default class Line extends Base {
 
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null

+ 0 - 1
packages/core/src/annotation/link.js

@@ -27,7 +27,6 @@ export default class Link extends Base {
     })
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null

+ 0 - 1
packages/core/src/annotation/redaction.js

@@ -28,7 +28,6 @@ export default class Redaction extends Base {
     })
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null

+ 0 - 1
packages/core/src/annotation/shape.js

@@ -29,7 +29,6 @@ export default class Shape extends Base {
 
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null

+ 0 - 1
packages/core/src/annotation/stamp.js

@@ -28,7 +28,6 @@ export default class Stamp extends Base {
 
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.messageHandler = messageHandler
 

+ 0 - 1
packages/core/src/annotation/text.js

@@ -35,7 +35,6 @@ export default class Text extends Base {
     
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.rect = null
     this.start = null

+ 1 - 0
packages/core/src/form/add_check_box.js

@@ -141,6 +141,7 @@ export default class AddCheckBox {
 
       this.eventBus.dispatch('annotationChange', {
         type: 'add',
+        show: true,
         annotation: annotationData
       })
     }

+ 1 - 0
packages/core/src/form/add_radio_button.js

@@ -141,6 +141,7 @@ export default class AddRadioButton {
 
       this.eventBus.dispatch('annotationChange', {
         type: 'add',
+        show: true,
         annotation: annotationData
       })
     }

+ 1 - 0
packages/core/src/form/add_signature_fields.js

@@ -145,6 +145,7 @@ export default class AddSignField {
 
       this.eventBus.dispatch('annotationChange', {
         type: 'add',
+        show: true,
         annotation: annotationData
       })
     }

+ 1 - 0
packages/core/src/form/add_text_field.js

@@ -146,6 +146,7 @@ export default class AddTextField {
 
       this.eventBus.dispatch('annotationChange', {
         type: 'add',
+        show: true,
         annotation: annotationData
       })
     }

+ 4 - 1
packages/core/src/form/check_box.js

@@ -27,7 +27,6 @@ export default class CheckBox extends Base {
     this.messageHandler = messageHandler
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null
@@ -395,6 +394,10 @@ export default class CheckBox extends Base {
         this.annotationContainer.style.pointerEvents = 'auto'
       }
     }
+    if (this.show) {
+      !this.layer.addMode && this.selectAnnotation()
+      this.show = false
+    }
   }
 
   getActualRect (viewport, s,) {

+ 4 - 3
packages/core/src/form/combo_box.js

@@ -27,7 +27,6 @@ export default class ComboBox extends Base {
     this.messageHandler = messageHandler
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null
@@ -393,8 +392,10 @@ export default class ComboBox extends Base {
         this.annotationContainer.style.pointerEvents = 'auto'
       }
     }
-
-    if (this.show) this.handleClick()
+    if (this.show) {
+      !this.layer.addMode && this.selectAnnotation()
+      this.show = false
+    }
   }
 
   getActualRect (viewport, s,) {

+ 4 - 3
packages/core/src/form/list_box.js

@@ -27,7 +27,6 @@ export default class ListBox extends Base {
     this.messageHandler = messageHandler
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null
@@ -358,8 +357,10 @@ export default class ListBox extends Base {
         this.annotationContainer.style.pointerEvents = 'auto'
       }
     }
-
-    if (this.show) this.handleClick()
+    if (this.show) {
+      !this.layer.addMode && this.selectAnnotation()
+      this.show = false
+    }
   }
 
   getActualRect(viewport, s,) {

+ 4 - 3
packages/core/src/form/push_button.js

@@ -27,7 +27,6 @@ export default class PushButton extends Base {
     this.messageHandler = messageHandler
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null
@@ -335,8 +334,10 @@ export default class PushButton extends Base {
         this.annotationContainer.style.pointerEvents = 'auto'
       }
     }
-
-    if (this.show) this.handleClick()
+    if (this.show) {
+      !this.layer.addMode && this.selectAnnotation()
+      this.show = false
+    }
   }
 
   getActualRect (viewport, s,) {

+ 4 - 1
packages/core/src/form/radio_button.js

@@ -27,7 +27,6 @@ export default class RadioButton extends Base {
     this.messageHandler = messageHandler
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null
@@ -396,6 +395,10 @@ export default class RadioButton extends Base {
         this.annotationContainer.style.pointerEvents = 'auto'
       }
     }
+    if (this.show) {
+      !this.layer.addMode && this.selectAnnotation()
+      this.show = false
+    }
   }
 
   getActualRect (viewport, s,) {

+ 4 - 1
packages/core/src/form/signature_fields.js

@@ -24,7 +24,6 @@ export default class SignatureFields extends Base {
     })
     this.messageHandler = messageHandler
     this.hidden = true
-    this.outline = null
 
     this.start = null
     this.end = null
@@ -307,6 +306,10 @@ export default class SignatureFields extends Base {
     this.outerLine.append(this.topRect)
     this.outerLineContainer.append(this.outerLine)
     this.outerLineContainer.append(this.deletetButton)
+    if (this.show) {
+      !this.layer.addMode && this.selectAnnotation()
+      this.show = false
+    }
   }
 
   getActualRect (viewport, s,) {

+ 4 - 1
packages/core/src/form/text_field.js

@@ -27,7 +27,6 @@ export default class TextField extends Base {
     this.messageHandler = messageHandler
     this.hidden = true
     this.initial = false
-    this.outline = null
 
     this.start = null
     this.end = null
@@ -312,6 +311,10 @@ export default class TextField extends Base {
         this.annotationContainer.style.pointerEvents = 'auto'
       }
     }
+    if (this.show) {
+      !this.layer.addMode && this.selectAnnotation()
+      this.show = false
+    }
   }
 
   getActualRect (viewport, s,) {