diff --git a/visionforge-compose-html/src/jsMain/kotlin/space/kscience/visionforge/compose/PropertyEditor.kt b/visionforge-compose-html/src/jsMain/kotlin/space/kscience/visionforge/compose/PropertyEditor.kt
index 82277701..89bae724 100644
--- a/visionforge-compose-html/src/jsMain/kotlin/space/kscience/visionforge/compose/PropertyEditor.kt
+++ b/visionforge-compose-html/src/jsMain/kotlin/space/kscience/visionforge/compose/PropertyEditor.kt
@@ -31,7 +31,6 @@ public sealed class EditorPropertyState {
public data object Defined : EditorPropertyState()
public data class Default(public val source: String = "unknown") : EditorPropertyState()
public data object Undefined : EditorPropertyState()
-
}
/**
@@ -44,8 +43,8 @@ public fun PropertyEditor(
rootMeta: MutableMeta,
getPropertyState: (Name) -> EditorPropertyState,
updates: Flow,
- name: Name = Name.EMPTY,
- rootDescriptor: MetaDescriptor? = null,
+ name: Name,
+ rootDescriptor: MetaDescriptor?,
initialExpanded: Boolean? = null,
) {
var expanded: Boolean by remember { mutableStateOf(initialExpanded ?: true) }
@@ -97,8 +96,12 @@ public fun PropertyEditor(
}
Span({
classes(TreeStyles.treeLabel)
- if (editorPropertyState != EditorPropertyState.Defined) {
- classes(TreeStyles.treeLabelInactive)
+ when (editorPropertyState) {
+ is EditorPropertyState.Default, EditorPropertyState.Undefined -> {
+ classes(TreeStyles.treeLabelInactive)
+ }
+
+ EditorPropertyState.Defined -> {}
}
}) {
Text(token)
diff --git a/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/compose/ThreeView.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/compose/ThreeView.kt
index 1c69ddb9..21a61ebd 100644
--- a/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/compose/ThreeView.kt
+++ b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/compose/ThreeView.kt
@@ -148,6 +148,7 @@ public fun ThreeView(
EditorPropertyState.Undefined
}
},
+ name = Name.EMPTY,
updates = vision.properties.changes,
rootDescriptor = vision.descriptor
)