feat(canvas): support unframed image snapshot nodes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user