aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-06-03 18:31:49 +0200
committerRobert Jaros <rjaros@finn.pl>2019-06-03 18:31:49 +0200
commitf9398d1ae7da496d3a290d7b225225d70a4bb174 (patch)
tree9deb7578e9814c3155adb8fe0ffa3d146cecc584 /src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
parentfc7f3588472423ce915113c8d2089e4df3793de0 (diff)
downloadkvision-f9398d1ae7da496d3a290d7b225225d70a4bb174.tar.gz
kvision-f9398d1ae7da496d3a290d7b225225d70a4bb174.tar.bz2
kvision-f9398d1ae7da496d3a290d7b225225d70a4bb174.zip
Refactor support for additional attributes from Tag up to the Widget class.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/Root.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/Root.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
index dd3d39b6..2d9dcc46 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
@@ -71,7 +71,6 @@ class Root(
}
roots.add(this)
if (isFirstRoot) {
- Style.styles.forEach { it.parent = this }
Modal.modals.forEach { it.parent = this }
}
@Suppress("LeakingThis")
@@ -102,9 +101,8 @@ class Root(
private fun stylesVNodes(): Array<VNode> {
return if (isFirstRoot) {
- val visibleStyles = Style.styles.filter { it.visible }
- if (visibleStyles.isNotEmpty()) {
- val stylesDesc = visibleStyles.joinToString("\n") { it.generateStyle() }
+ if (Style.styles.isNotEmpty()) {
+ val stylesDesc = Style.styles.joinToString("\n") { it.generateStyle() }
arrayOf(h("style", arrayOf(stylesDesc)))
} else {
arrayOf()