diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/Root.kt | 5 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt | 2 |
2 files changed, 6 insertions, 1 deletions
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<Root> = 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 |