feat(编辑能力): 新增画笔和注解创建,完善水印、印章与链接编辑,优化选取和保存体验
build.yaml / build (push) Successful in 39s

This commit is contained in:
xiaoqidun committed 2026-09-18 08:34:35 +08:00
1 parent ed11ade4e8
commit a8346a6006
23 files changed
+2297 -104

No files matched your search

+1 -22
View File
@@ -18,7 +18,6 @@ import (
"bytes"
"encoding/xml"
"fmt"
"maps"
"path"
"strings"
"time"
@@ -284,25 +283,5 @@ func (e *Editor) editAnnotations(index int, ids []string, edit func([]byte, *edi
if len(parts) == 0 {
return nil
}
files := maps.Clone(reader.files)
if files == nil {
files = make(map[string][]byte)
}
maps.Copy(files, parts)
updated := &Reader{Zip: reader.Zip, files: files}
if err := updated.initRoot(); err != nil {
return err
}
doc, err := updated.Doc()
if err != nil {
return err
}
before, after := e.source, *e.source
after.reader, after.document = updated, doc
e.source = &after
if change := e.recordChange(); change != nil {
change.undo = func(e *Editor) { e.source = before }
change.redo = func(e *Editor) { e.source = &after }
}
return nil
return e.commitAnnotationParts(e.source, parts)
}