Browse Source

fix: 表单注释部分属性更新后不刷新外观避免刷掉之前外观

liutian 2 weeks ago
parent
commit
649ff04a68
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/core/src/worker/compdfkit_worker.js

+ 2 - 3
packages/core/src/worker/compdfkit_worker.js

@@ -604,6 +604,7 @@ class CPDFWorker {
       }
       if (annotation.fontName || annotation.fontSize || annotation.color) {
         setAnnotFontData(annotation)
+        Module._UpdateFormAp(annotation.annotPtr)
       }
       if (annotation.item) {
         addWidgetItem(annotation)
@@ -633,9 +634,7 @@ class CPDFWorker {
         setAnnotAuthor(annotation)
       }
 
-      if (annotation.operate === 'mod-form' && annotation.type !== 'signatureFields') {
-        Module._UpdateFormAp(annotation.annotPtr)
-      } else {
+      if (annotation.operate === 'mod-annot') {
         Module._UpdateAnnotAp(annotation.annotPtr, 0)
       }
     })