This commit is contained in:
space-nuko
2023-05-06 15:25:57 -05:00
parent 81618da303
commit faf22fccf4
4 changed files with 32 additions and 17 deletions

View File

@@ -40,6 +40,9 @@
for (const cat of Object.values(ALL_ATTRIBUTES)) {
for (const spec of Object.values(cat.specs)) {
if (spec.location === "widget" && target.attrs[spec.name] == null) {
if (!spec.editable)
continue;
if (spec.canShow && !spec.canShow(target))
continue;
@@ -117,7 +120,7 @@
}
function updateAttribute(spec: AttributesSpec, target: IDragItem | null, value: any) {
if (target == null)
if (target == null || !spec.editable)
return;
const name = spec.name
@@ -142,7 +145,7 @@
}
function updateProperty(spec: AttributesSpec, value: any) {
if (node == null)
if (node == null || !spec.editable)
return
const name = spec.name
@@ -170,7 +173,7 @@
}
function updateVar(spec: AttributesSpec, value: any) {
if (node == null)
if (node == null || !spec.editable)
return;
const name = spec.name
@@ -190,8 +193,11 @@
$refreshPanel += 1;
}
function updateWorkflowAttribute(entry: AttributesSpec, value: any) {
const name = entry.name
function updateWorkflowAttribute(spec: AttributesSpec, value: any) {
if (!spec.editable)
return;
const name = spec.name
console.warn("updateWorkflowAttribute", name, value)
$layoutState.attrs[name] = value
@@ -389,6 +395,11 @@
padding: 0.8rem 1.0rem;
.title {
font-weight: bold;
.type {
padding-left: 0.25rem;
font-weight: normal;
}
}
}