diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-09-30 01:34:06 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-09-30 01:34:06 +0200 |
commit | 4a62542e4dcc47c337885c74704500b67c15d02d (patch) | |
tree | 164dac331f44d851000058632c00610afe37da40 /src | |
parent | 089447dd370314276531836e39afa2224eb8f6b8 (diff) | |
download | kvision-4a62542e4dcc47c337885c74704500b67c15d02d.tar.gz kvision-4a62542e4dcc47c337885c74704500b67c15d02d.tar.bz2 kvision-4a62542e4dcc47c337885c74704500b67c15d02d.zip |
Change root "fluid" into "not fixed"
Diffstat (limited to 'src')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/core/Root.kt | 4 | ||||
-rw-r--r-- | src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Root.kt b/src/main/kotlin/pl/treksoft/kvision/core/Root.kt index 21bdca04..82030249 100644 --- a/src/main/kotlin/pl/treksoft/kvision/core/Root.kt +++ b/src/main/kotlin/pl/treksoft/kvision/core/Root.kt @@ -4,7 +4,7 @@ import com.github.snabbdom.VNode import pl.treksoft.kvision.modal.Modal import pl.treksoft.kvision.snabbdom.StringBoolPair -class Root(id: String, private val fluid: Boolean = true) : Container() { +class Root(id: String, private val fixed: Boolean = false) : Container() { private val modals: MutableList<Modal> = mutableListOf() private var rootVnode: VNode = render() @@ -29,7 +29,7 @@ class Root(id: String, private val fluid: Boolean = true) : Container() { } override fun getSnClass(): List<StringBoolPair> { - val css = if (fluid) "container-fluid" else "container" + val css = if (!fixed) "container-fluid" else "container" return super.getSnClass() + (css to true) } diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt index bb6ed603..d8739a8b 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt @@ -13,16 +13,16 @@ class RootSpec : DomSpec { run { Root("test") val rootElem = document.getElementById("test") - assertTrue("Standard root container has correct css class") { rootElem?.className == "container" } + assertTrue("Standard root container has correct css class") { rootElem?.className == "container-fluid" } } } @Test fun getSnClass_Fluid() { run { - Root("test", fluid = true) + Root("test", fixed = true) val rootElem = document.getElementById("test") - assertTrue("Fluid root container has correct css class") { rootElem?.className == "container-fluid" } + assertTrue("Fluid root container has correct css class") { rootElem?.className == "container" } } } |