Ver código fonte

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

liutian 2 semanas atrás
pai
commit
649ff04a68
1 arquivos alterados com 2 adições e 3 exclusões
  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)
       }
     })