diff --git a/demo/gdml/build.gradle.kts b/demo/gdml/build.gradle.kts index 8f8c0f9f..c16fce83 100644 --- a/demo/gdml/build.gradle.kts +++ b/demo/gdml/build.gradle.kts @@ -1,5 +1,6 @@ import scientifik.DependencyConfiguration import scientifik.FXModule +import scientifik.useFx plugins { id("scientifik.mpp") diff --git a/ui/react/src/main/kotlin/hep/dataforge/vision/react/valueChooser.kt b/ui/react/src/main/kotlin/hep/dataforge/vision/react/valueChooser.kt index fd579c62..e7562131 100644 --- a/ui/react/src/main/kotlin/hep/dataforge/vision/react/valueChooser.kt +++ b/ui/react/src/main/kotlin/hep/dataforge/vision/react/valueChooser.kt @@ -49,7 +49,7 @@ class ValueChooserComponent(props: ValueChooserProps) : RComponent Unit = { event -> + private val commit: (Event) -> Unit = { _ -> props.valueChanged?.invoke(getValue()) } diff --git a/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/serialization.kt b/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/serialization.kt index 877f9b3b..ba672093 100644 --- a/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/serialization.kt +++ b/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/serialization.kt @@ -1,5 +1,6 @@ package hep.dataforge.vision.solid +import hep.dataforge.meta.DFExperimental import hep.dataforge.meta.double import hep.dataforge.names.NameToken import hep.dataforge.vision.MutableVisionGroup @@ -118,8 +119,10 @@ internal object PrototypesSerializer : KSerializer { } } +@OptIn(DFExperimental::class) fun Vision.stringify(): String = SolidManager.jsonForSolids.stringify(Vision.serializer(), this) +@OptIn(DFExperimental::class) fun Vision.Companion.parseJson(str: String) = SolidManager.jsonForSolids.parse(Vision.serializer(), str).also { if(it is VisionGroup){ it.attachChildren()