From f1bb9fa4fca9b49c861b0828a8ba2360417777de Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 25 May 2018 13:37:36 +0200 Subject: Small fixes. --- src/main/kotlin/pl/treksoft/kvision/panel/Root.kt | 5 +++++ src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt index 7ab68fdd..667559b7 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt @@ -110,6 +110,11 @@ class Root(id: String, private val fixed: Boolean = false, init: (Root.() -> Uni return this } + override fun dispose() { + super.dispose() + roots.remove(this) + } + companion object { private val roots: MutableList = mutableListOf() diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt index 5ac9c6e7..f3625e97 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt @@ -69,7 +69,7 @@ open class SplitPanel( val horizontal = direction == Direction.HORIZONTAL val px = UNIT.px val self = this - children[0].getElementJQueryD().resizable(obj { + children[0].getElementJQueryD()?.resizable(obj { handleSelector = "#" + splitter.id resizeWidth = !horizontal resizeHeight = horizontal -- cgit