feat(编辑能力): 增强图文编辑能力,优化界面与保存可靠性
build.yaml / build (push) Successful in 42s

This commit is contained in:
xiaoqidun committed 2026-09-24 11:58:40 +08:00
1 parent 0508029387
commit d7cd3d03b5
20 files changed
+1158 -137

No files matched your search

+10 -3
View File
@@ -783,7 +783,9 @@ func (e *Editor) prepareObject(id string, object GraphicObject) (GraphicObject,
}
}
if obj.Border != nil {
return GraphicObject{}, fmt.Errorf("image borders are not supported for creation")
if err := e.validateImageBorder(obj.Border); err != nil {
return GraphicObject{}, err
}
}
obj.ID = id
boundary, ctm = obj.Boundary, obj.CTM
@@ -802,8 +804,13 @@ func (e *Editor) prepareObject(id string, object GraphicObject) (GraphicObject,
} else if object.Type == "ImageObject" {
object.ImageObject.CTM = fmt.Sprintf("%s 0 0 %s 0 0", ofdNumber(box.W), ofdNumber(box.H))
}
if drawParam != "" || len(actions) != 0 {
return GraphicObject{}, fmt.Errorf("draw parameter references and actions are not supported for creation")
if drawParam != "" {
if _, err := e.editorDrawParam(drawParam, make(map[string]bool)); err != nil {
return GraphicObject{}, err
}
}
if err := validateObjectActions(actions); err != nil {
return GraphicObject{}, err
}
if err := e.validateObjectClips(clips); err != nil {
return GraphicObject{}, err