mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
feat(编辑渲染): 完善三维转换,优化编辑渲染压缩
This commit is contained in:
1 parent
e8344e6387
commit
839f65e3d7
47 files changed
+4887
-112
No files matched your search
@@ -1097,20 +1097,17 @@ func (v *editorValidation) validateVector(id string) error {
|
||||
if v.composites[id] {
|
||||
return fmt.Errorf("cyclic composite resource %q", id)
|
||||
}
|
||||
if v.vectors[id] {
|
||||
return nil
|
||||
}
|
||||
if v.composites == nil {
|
||||
v.composites = make(map[string]bool)
|
||||
v.vectors = make(map[string]*editorCompositeNode)
|
||||
}
|
||||
v.composites[id] = true
|
||||
defer delete(v.composites, id)
|
||||
node := v.vectors[id]
|
||||
if node == nil {
|
||||
var err error
|
||||
node, err = v.compositeDefinition(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
v.vectors[id] = node
|
||||
node, err := v.compositeDefinition(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
unit := node.object.CompositeGraphicUnit
|
||||
if node.node.attr("Width") == "" || node.node.attr("Height") == "" || !finite(unit.Width) || !finite(unit.Height) || unit.Width < 0 || unit.Height < 0 {
|
||||
@@ -1131,5 +1128,9 @@ func (v *editorValidation) validateVector(id string) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if v.vectors == nil {
|
||||
v.vectors = make(map[string]bool)
|
||||
}
|
||||
v.vectors[id] = true
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user