Make it easier to preview the properties view

Provide some dummy property data, and provide a preferred height that makes the preview show the properties.
This commit is contained in:
Simon Hausmann 2024-09-19 09:41:51 +02:00 committed by Simon Hausmann
parent b2873a3d17
commit cd1de28cd7
2 changed files with 71 additions and 2 deletions

View file

@ -182,7 +182,75 @@ export global Api {
// ## Property Editor
in-out property <ElementInformation> current-element;
in-out property <[PropertyGroup]> properties;
in-out property <[PropertyGroup]> properties: [
{
group-name: "geometry",
properties: [
{
name: "width",
type-name: "length",
value: {
kind: PropertyValueKind.float,
value-float: 100,
visual-items: ["px", "cm", "mm", "in", "pt", "phx"],
}
},
{
name: "height",
type-name: "length",
value: {
kind: PropertyValueKind.float,
value-float: 200,
visual-items: ["px", "cm", "mm", "in", "pt", "phx"],
}
},
{
name: "z",
type-name: "float",
value: {
kind: PropertyValueKind.float,
value-float: 0,
}
}
]
},
{
group-name: "Button",
properties: [
{
name: "text",
type-name: "string",
value: {
is-translatable: true,
kind: PropertyValueKind.string,
}
},
{
name: "checkable",
type-name: "bool",
value: {
kind: PropertyValueKind.boolean,
}
},
{
name: "icon",
type-name: "image",
value: {
kind: PropertyValueKind.code,
}
},
{
name: "color",
type-name: "brush",
value: {
kind: PropertyValueKind.brush,
value-brush: Colors.green,
value-string: "#00ff00"
},
}
]
}
];
// # Callbacks