fix(canvas): retain canonical frame rotation across owner changes
Foundry Go checks / check (push) Successful in 3m26s
Foundry Go checks / check (pull_request) Successful in 3m28s

This commit is contained in:
2026-11-11 18:53:06 +08:00
parent 36d69133b8
commit 506f778ac3
3 changed files with 67 additions and 2 deletions
+3 -1
View File
@@ -266,7 +266,9 @@ func validateCanvasModel(model canvasModel) error {
return errCanvasModel
}
if version == 1 && canvasChoice(component, "text", "image", "script", "plain-text", "plain-image", "icon", "frame") {
if !canvasString(data["title"], 300) || !canvasString(data["text"], 100000) || component == "frame" && geometry["rotation"] != float64(0) {
// Canonical frames can inherit rotation while changing owners. The
// legacy snapshot writer's zero-angle restriction does not apply here.
if !canvasString(data["title"], 300) || !canvasString(data["text"], 100000) {
return errCanvasModel
}
if ai, exists := data["ai"]; exists && !validCanvasAI(ai, component) {