feat(canvas): support unframed image snapshot nodes
Foundry Go checks / check (push) Successful in 3m24s
Foundry Go checks / check (pull_request) Successful in 3m27s

This commit is contained in:
2026-11-06 12:38:45 +08:00
parent 022086beb8
commit 460b05f187
3 changed files with 25 additions and 1 deletions
+3 -1
View File
@@ -135,6 +135,8 @@ func normalizeCanvas(raw json.RawMessage) (json.RawMessage, bool) {
typ := "material"
if kind == "plain-text" {
typ = "plainText"
} else if kind == "plain-image" {
typ = "plainImage"
} else if kind == "icon" {
typ = "icon"
} else if kind == "frame" {
@@ -172,7 +174,7 @@ func normalizeCanvas(raw json.RawMessage) (json.RawMessage, bool) {
return nil, false
}
}
if src, exists := d["src"]; (exists || kind == "image") && !canvasImage(src) {
if src, exists := d["src"]; (exists || kind == "image" || kind == "plain-image") && !canvasImage(src) {
return nil, false
}
if value, exists := d["textStyle"]; exists {