mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
feat(编辑渲染): 修复资源引用,完善注解读取
This commit is contained in:
1 parent
a5f51294eb
commit
52fc88f2b8
14 files changed
+198
-114
No files matched your search
+6
-6
@@ -366,7 +366,7 @@ func (r *Renderer) annotationActionSources(annotations []Annotation) []actionSou
|
||||
// appendGraphicActionSources 添加图形对象动作来源
|
||||
// 入参: sources 动作来源, object 图形对象, parent 父级变换, boundaryInCTM 边界是否参与父级变换, seen 当前资源引用链
|
||||
// 返回: []actionSource 动作来源
|
||||
func (r *Renderer) appendGraphicActionSources(sources []actionSource, object GraphicObject, parent Matrix, boundaryInCTM bool, seen map[string]bool) []actionSource {
|
||||
func (r *Renderer) appendGraphicActionSources(sources []actionSource, object GraphicObject, parent Matrix, boundaryInCTM bool, seen map[*CompositeGraphicUnit]bool) []actionSource {
|
||||
var boundary, ctm, resource string
|
||||
var actions []Action
|
||||
var children []GraphicObject
|
||||
@@ -412,14 +412,14 @@ func (r *Renderer) appendGraphicActionSources(sources []actionSource, object Gra
|
||||
}
|
||||
sources = append(sources, source)
|
||||
}
|
||||
if resource != "" && !seen[resource] {
|
||||
if unit := r.CompositeGraphicUnits[resource]; unit != nil {
|
||||
if resource != "" {
|
||||
if unit, _ := resourceValue(r.CompositeGraphicUnits, resource); unit != nil && !seen[unit] {
|
||||
if seen == nil {
|
||||
seen = make(map[string]bool)
|
||||
seen = make(map[*CompositeGraphicUnit]bool)
|
||||
}
|
||||
seen[resource] = true
|
||||
seen[unit] = true
|
||||
sources = r.appendGraphicActionSources(sources, GraphicObject{Type: "CompositeGraphicUnit", CompositeGraphicUnit: *unit}, matrix, true, seen)
|
||||
delete(seen, resource)
|
||||
delete(seen, unit)
|
||||
}
|
||||
}
|
||||
for _, child := range children {
|
||||
|
||||
Reference in new issue
Block a user