From 0581d63315b3be69c27032f309255be4a723ed4f Mon Sep 17 00:00:00 2001 From: Peter Klimai Date: Sat, 12 Oct 2019 12:30:56 +0300 Subject: [PATCH] Makes sure the correct Element's clear() method is called - Fixes #4 --- .../kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt index 13868fdf..0a9495d7 100644 --- a/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt +++ b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt @@ -16,6 +16,7 @@ import info.laht.threekt.loaders.Cache.clear import kotlinx.html.div import kotlinx.html.dom.append import org.w3c.dom.Element +import kotlin.dom.clear import kotlin.js.json operator fun Name.plus(other: NameToken): Name = Name(tokens + other) @@ -123,7 +124,7 @@ private fun VisualObject.toTree(onFocus: (VisualObject?, String?) -> Unit = { _, } fun Element.visualObjectTree(group: VisualObject, onFocus: (VisualObject?, String?) -> Unit) { - clear() + this.clear() append { card("Visual object tree") { val domConfig = jsObject {