移除 UI 设计尺寸暴露字段

删除 --ui-design-width 与 --ui-design-height 自定义属性

不再在树元数据注释中暴露设计图宽高
This commit is contained in:
2026-08-31 19:16:38 +08:00
parent 56be007ec9
commit 0e0c40a69d
@@ -66,14 +66,10 @@ fn render_tree(state: &State, tree: &UITree) -> Result<Markup, String> {
/ finite_positive(image.pixels_per_unit.get(), "UI design pixelsPerUnit")?;
let tree_comment = html_comment(
"genarrative-ui-tree",
json!({
"srcUiDesign": tree.src_ui_design.as_str(),
"width": width,
"height": height,
}),
json!({"srcUiDesign": tree.src_ui_design.as_str()}),
);
let style = format!(
"position:relative;width:100%;height:auto;min-height:0;aspect-ratio:{width} / {height};--ui-design-width:{width}px;--ui-design-height:{height}px;"
"position:relative;width:100%;height:auto;min-height:0;aspect-ratio:{width} / {height};"
);
Ok(html! {
(tree_comment)