From 33146fef1b59f7fcf8dae6bdafbc8fb8face2773 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 2 Jan 2021 11:30:39 +0300 Subject: [PATCH] Fix persistent bug with sat-demo updates --- README.md | 4 ++++ .../src/commonMain/kotlin/hep/dataforge/vision/VisionBase.kt | 4 +++- .../commonMain/kotlin/hep/dataforge/vision/VisionChange.kt | 2 +- .../kotlin/hep/dataforge/vision/html/VisionTagConsumer.kt | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fea0692c..ad589f69 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ ## Table of Contents * [Introduction](#introduction) +* [Requirements](#requirements) * [Features](#features) * [About DataForge](#about-dataforge) * [Modules contained in this repository](#modules-contained-in-this-repository) @@ -34,6 +35,9 @@ Other applications including 2D plots are planned for the future. The project is developed as a [Kotlin multiplatform](https://kotlinlang.org/docs/reference/multiplatform.html) application, currently targeting browser JavaScript and JVM. +## Requirements + +JVM backend requires JDK 11 or later ## Features diff --git a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionBase.kt b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionBase.kt index dddcb377..e04be28f 100644 --- a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionBase.kt +++ b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionBase.kt @@ -86,7 +86,9 @@ public open class VisionBase(internal var properties: Config? = null) : Vision { if (inherit) { yield(parent?.getProperty(name, inherit, includeStyles, includeDefaults)) } - yield(descriptor?.get(name)?.defaultItem()) + if (includeDefaults) { + yield(descriptor?.get(name)?.defaultItem()) + } }.merge() override fun setProperty(name: Name, item: MetaItem?, notify: Boolean) { diff --git a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionChange.kt b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionChange.kt index 8d799ef8..cb80fd7d 100644 --- a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionChange.kt +++ b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/VisionChange.kt @@ -82,7 +82,7 @@ private fun CoroutineScope.collectChange( //Collect properties change source.onPropertyChange(this) { propertyName -> - val newItem = source.getProperty(propertyName, inherit = false, includeStyles = false, includeDefaults = false) + val newItem = source.getOwnProperty(propertyName) collector().propertyChanged(name, propertyName, newItem) } diff --git a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/VisionTagConsumer.kt b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/VisionTagConsumer.kt index 5d0a7be7..84d73269 100644 --- a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/VisionTagConsumer.kt +++ b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/VisionTagConsumer.kt @@ -12,7 +12,7 @@ import kotlinx.html.* * A placeholder object to attach inline vision builders. */ @DFExperimental -public class VisionOutput @PublishedApi internal constructor(){ +public class VisionOutput @PublishedApi internal constructor() { public var meta: Meta = Meta.EMPTY public inline fun meta(block: MetaBuilder.() -> Unit) { @@ -104,6 +104,6 @@ public abstract class VisionTagConsumer( public const val OUTPUT_ENDPOINT_ATTRIBUTE: String = "data-output-endpoint" public const val DEFAULT_ENDPOINT: String = "." - public const val DEFAULT_VISION_NAME = "vision" + public const val DEFAULT_VISION_NAME: String = "vision" } } \ No newline at end of file