diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-02-25 01:04:24 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-02-25 01:04:24 +0100 |
commit | 9a1effcf29b27cc2e60b927c2d737b6cad0289b7 (patch) | |
tree | cd47309106493f869a7d7d5e9a43dcc99969dd4c /src/main/kotlin/pl/treksoft/kvision/panel | |
parent | c64b2c4b1f0c4e0e0d94d202715db4aaa47d9c65 (diff) | |
download | kvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.tar.gz kvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.tar.bz2 kvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.zip |
Change enum classes names for better readability.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel')
7 files changed, 88 insertions, 88 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt index b605cf56..3a5f25f2 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt @@ -27,7 +27,7 @@ import pl.treksoft.kvision.core.Container /** * Dock layout directions. */ -enum class SIDE { +enum class Side { LEFT, RIGHT, CENTER, @@ -75,14 +75,14 @@ open class DockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit * Internal property. */ protected val mainContainer = FlexPanel( - direction = FLEXDIR.COLUMN, justify = FLEXJUSTIFY.SPACEBETWEEN, - alignItems = FLEXALIGNITEMS.STRETCH + direction = FlexDir.COLUMN, justify = FlexJustify.SPACEBETWEEN, + alignItems = FlexAlignItems.STRETCH ) /** * @suppress * Internal property. */ - protected val subContainer = FlexPanel(justify = FLEXJUSTIFY.SPACEBETWEEN, alignItems = FLEXALIGNITEMS.CENTER) + protected val subContainer = FlexPanel(justify = FlexJustify.SPACEBETWEEN, alignItems = FlexAlignItems.CENTER) init { this.addInternal(mainContainer) @@ -98,39 +98,39 @@ open class DockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit * @return current container */ @Suppress("MagicNumber") - open fun add(child: Component, position: SIDE): DockPanel { + open fun add(child: Component, position: Side): DockPanel { when (position) { - SIDE.UP -> { + Side.UP -> { upComponent?.let { mainContainer.remove(it) } upComponent = child - mainContainer.add(child, 1, alignSelf = FLEXALIGNITEMS.CENTER) + mainContainer.add(child, 1, alignSelf = FlexAlignItems.CENTER) } - SIDE.CENTER -> { + Side.CENTER -> { centerComponent?.let { subContainer.remove(it) } centerComponent = child subContainer.add(child, 2) } - SIDE.LEFT -> { + Side.LEFT -> { leftComponent?.let { subContainer.remove(it) } leftComponent = child subContainer.add(child, 1) } - SIDE.RIGHT -> { + Side.RIGHT -> { rightComponent?.let { subContainer.remove(it) } rightComponent = child subContainer.add(child, 3) } - SIDE.DOWN -> { + Side.DOWN -> { downComponent?.let { mainContainer.remove(it) } downComponent = child - mainContainer.add(child, 3, alignSelf = FLEXALIGNITEMS.CENTER) + mainContainer.add(child, 3, alignSelf = FlexAlignItems.CENTER) } } return this } override fun add(child: Component): DockPanel { - return this.add(child, SIDE.CENTER) + return this.add(child, Side.CENTER) } override fun addAll(children: List<Component>): DockPanel { @@ -139,11 +139,11 @@ open class DockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit } override fun remove(child: Component): DockPanel { - if (child == leftComponent) removeAt(SIDE.LEFT) - if (child == centerComponent) removeAt(SIDE.CENTER) - if (child == rightComponent) removeAt(SIDE.RIGHT) - if (child == upComponent) removeAt(SIDE.UP) - if (child == downComponent) removeAt(SIDE.DOWN) + if (child == leftComponent) removeAt(Side.LEFT) + if (child == centerComponent) removeAt(Side.CENTER) + if (child == rightComponent) removeAt(Side.RIGHT) + if (child == upComponent) removeAt(Side.UP) + if (child == downComponent) removeAt(Side.DOWN) return this } @@ -152,25 +152,25 @@ open class DockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit * @param position position in the dock * @return current container */ - open fun removeAt(position: SIDE): DockPanel { + open fun removeAt(position: Side): DockPanel { when (position) { - SIDE.UP -> { + Side.UP -> { upComponent?.let { mainContainer.remove(it) } upComponent = null } - SIDE.CENTER -> { + Side.CENTER -> { centerComponent?.let { subContainer.remove(it) } centerComponent = null } - SIDE.LEFT -> { + Side.LEFT -> { leftComponent?.let { subContainer.remove(it) } leftComponent = null } - SIDE.RIGHT -> { + Side.RIGHT -> { rightComponent?.let { subContainer.remove(it) } rightComponent = null } - SIDE.DOWN -> { + Side.DOWN -> { downComponent?.let { mainContainer.remove(it) } downComponent = null } @@ -179,11 +179,11 @@ open class DockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit } override fun removeAll(): DockPanel { - removeAt(SIDE.LEFT) - removeAt(SIDE.CENTER) - removeAt(SIDE.RIGHT) - removeAt(SIDE.UP) - removeAt(SIDE.DOWN) + removeAt(Side.LEFT) + removeAt(Side.CENTER) + removeAt(Side.RIGHT) + removeAt(Side.UP) + removeAt(Side.DOWN) return this } diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt index 4591a747..d22a285b 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt @@ -31,7 +31,7 @@ import pl.treksoft.kvision.utils.px /** * CSS flexbox directions. */ -enum class FLEXDIR(internal val dir: String) { +enum class FlexDir(internal val dir: String) { ROW("row"), ROWREV("row-reverse"), COLUMN("column"), @@ -41,7 +41,7 @@ enum class FLEXDIR(internal val dir: String) { /** * CSS flexbox wrap modes. */ -enum class FLEXWRAP(internal val wrap: String) { +enum class FlexWrap(internal val wrap: String) { NOWRAP("nowrap"), WRAP("wrap"), WRAPREV("wrap-reverse") @@ -50,7 +50,7 @@ enum class FLEXWRAP(internal val wrap: String) { /** * CSS flexbox justification options. */ -enum class FLEXJUSTIFY(internal val justify: String) { +enum class FlexJustify(internal val justify: String) { FLEXSTART("flex-start"), FLEXEND("flex-end"), CENTER("center"), @@ -62,7 +62,7 @@ enum class FLEXJUSTIFY(internal val justify: String) { /** * CSS flexbox alignments options. */ -enum class FLEXALIGNITEMS(internal val alignItems: String) { +enum class FlexAlignItems(internal val alignItems: String) { FLEXSTART("flex-start"), FLEXEND("flex-end"), CENTER("center"), @@ -73,7 +73,7 @@ enum class FLEXALIGNITEMS(internal val alignItems: String) { /** * CSS flexbox content alignment options. */ -enum class FLEXALIGNCONTENT(internal val alignContent: String) { +enum class FlexAlignContent(internal val alignContent: String) { FLEXSTART("flex-start"), FLEXEND("flex-end"), CENTER("center"), @@ -96,8 +96,8 @@ enum class FLEXALIGNCONTENT(internal val alignContent: String) { * @param init an initializer extension function */ open class FlexPanel( - direction: FLEXDIR? = null, wrap: FLEXWRAP? = null, justify: FLEXJUSTIFY? = null, - alignItems: FLEXALIGNITEMS? = null, alignContent: FLEXALIGNCONTENT? = null, + direction: FlexDir? = null, wrap: FlexWrap? = null, justify: FlexJustify? = null, + alignItems: FlexAlignItems? = null, alignContent: FlexAlignContent? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (FlexPanel.() -> Unit)? = null ) : SimplePanel(classes) { @@ -144,7 +144,7 @@ open class FlexPanel( @Suppress("LongParameterList") fun add( child: Component, order: Int? = null, grow: Int? = null, shrink: Int? = null, - basis: Int? = null, alignSelf: FLEXALIGNITEMS? = null, classes: Set<String> = setOf() + basis: Int? = null, alignSelf: FlexAlignItems? = null, classes: Set<String> = setOf() ): FlexPanel { val wrapper = FlexWrapper(child, order, grow, shrink, basis, alignSelf, classes) addInternal(applySpacing(wrapper)) @@ -162,9 +162,9 @@ open class FlexPanel( wrapper.marginLeft = null spacing?.let { when (direction) { - FLEXDIR.COLUMN -> wrapper.marginBottom = it.px - FLEXDIR.ROWREV -> wrapper.marginLeft = it.px - FLEXDIR.COLUMNREV -> wrapper.marginTop = it.px + FlexDir.COLUMN -> wrapper.marginBottom = it.px + FlexDir.ROWREV -> wrapper.marginLeft = it.px + FlexDir.COLUMNREV -> wrapper.marginTop = it.px else -> wrapper.marginRight = it.px } } @@ -226,8 +226,8 @@ open class FlexPanel( * It takes the same parameters as the constructor of the built component. */ fun Container.flexPanel( - direction: FLEXDIR? = null, wrap: FLEXWRAP? = null, justify: FLEXJUSTIFY? = null, - alignItems: FLEXALIGNITEMS? = null, alignContent: FLEXALIGNCONTENT? = null, + direction: FlexDir? = null, wrap: FlexWrap? = null, justify: FlexJustify? = null, + alignItems: FlexAlignItems? = null, alignContent: FlexAlignContent? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (FlexPanel.() -> Unit)? = null ): FlexPanel { val flexPanel = FlexPanel(direction, wrap, justify, alignItems, alignContent, spacing, classes, init) @@ -243,7 +243,7 @@ open class FlexPanel( internal class FlexWrapper( delegate: Component, private val order: Int? = null, private val grow: Int? = null, private val shrink: Int? = null, private val basis: Int? = null, - private val alignSelf: FLEXALIGNITEMS? = null, + private val alignSelf: FlexAlignItems? = null, classes: Set<String> = setOf() ) : WidgetWrapper(delegate, classes) { diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt index 10e956be..1f5efbb4 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt @@ -29,7 +29,7 @@ import pl.treksoft.kvision.core.WidgetWrapper /** * CSS grid justification options. */ -enum class GRIDJUSTIFY(internal val justify: String) { +enum class GridJustify(internal val justify: String) { START("start"), END("end"), CENTER("center"), @@ -39,7 +39,7 @@ enum class GRIDJUSTIFY(internal val justify: String) { /** * CSS grid alignment options. */ -enum class GRIDALIGN(internal val align: String) { +enum class GridAlign(internal val align: String) { START("start"), END("end"), CENTER("center"), @@ -49,7 +49,7 @@ enum class GRIDALIGN(internal val align: String) { /** * CSS grid content justification options. */ -enum class GRIDJUSTIFYCONTENT(internal val justifyContent: String) { +enum class GridJustifyContent(internal val justifyContent: String) { START("start"), END("end"), CENTER("center"), @@ -62,7 +62,7 @@ enum class GRIDJUSTIFYCONTENT(internal val justifyContent: String) { /** * CSS grid content alignment options. */ -enum class GRIDALIGNCONTENT(internal val alignContent: String) { +enum class GridAlignContent(internal val alignContent: String) { START("start"), END("end"), CENTER("center"), @@ -75,7 +75,7 @@ enum class GRIDALIGNCONTENT(internal val alignContent: String) { /** * CSS grid flow options. */ -enum class GRIDFLOW(internal val flow: String) { +enum class GridFlow(internal val flow: String) { ROW("row"), COLUMN("column"), ROWDENSE("row dense"), @@ -102,11 +102,11 @@ enum class GRIDFLOW(internal val flow: String) { * @param init an initializer extension function */ open class GridPanel( - autoColumns: String? = null, autoRows: String? = null, autoFlow: GRIDFLOW? = null, + autoColumns: String? = null, autoRows: String? = null, autoFlow: GridFlow? = null, templateColumns: String? = null, templateRows: String? = null, templateAreas: List<String>? = null, - columnGap: Int? = null, rowGap: Int? = null, justifyItems: GRIDJUSTIFY? = null, - alignItems: GRIDALIGN? = null, justifyContent: GRIDJUSTIFYCONTENT? = null, - alignContent: GRIDALIGNCONTENT? = null, classes: Set<String> = setOf(), init: (GridPanel.() -> Unit)? = null + columnGap: Int? = null, rowGap: Int? = null, justifyItems: GridJustify? = null, + alignItems: GridAlign? = null, justifyContent: GridJustifyContent? = null, + alignContent: GridAlignContent? = null, classes: Set<String> = setOf(), init: (GridPanel.() -> Unit)? = null ) : SimplePanel(classes) { /** @@ -179,8 +179,8 @@ open class GridPanel( @Suppress("LongParameterList") fun add( child: Component, columnStart: Int? = null, rowStart: Int? = null, - columnEnd: String? = null, rowEnd: String? = null, area: String? = null, justifySelf: GRIDJUSTIFY? = null, - alignSelf: GRIDALIGN? = null, classes: Set<String> = setOf() + columnEnd: String? = null, rowEnd: String? = null, area: String? = null, justifySelf: GridJustify? = null, + alignSelf: GridAlign? = null, classes: Set<String> = setOf() ): GridPanel { addInternal(GridWrapper(child, columnStart, rowStart, columnEnd, rowEnd, area, justifySelf, alignSelf, classes)) return this @@ -263,11 +263,11 @@ open class GridPanel( * It takes the same parameters as the constructor of the built component. */ fun Container.gridPanel( - autoColumns: String? = null, autoRows: String? = null, autoFlow: GRIDFLOW? = null, + autoColumns: String? = null, autoRows: String? = null, autoFlow: GridFlow? = null, templateColumns: String? = null, templateRows: String? = null, templateAreas: List<String>? = null, - columnGap: Int? = null, rowGap: Int? = null, justifyItems: GRIDJUSTIFY? = null, - alignItems: GRIDALIGN? = null, justifyContent: GRIDJUSTIFYCONTENT? = null, - alignContent: GRIDALIGNCONTENT? = null, classes: Set<String> = setOf(), init: (GridPanel.() -> Unit)? = null + columnGap: Int? = null, rowGap: Int? = null, justifyItems: GridJustify? = null, + alignItems: GridAlign? = null, justifyContent: GridJustifyContent? = null, + alignContent: GridAlignContent? = null, classes: Set<String> = setOf(), init: (GridPanel.() -> Unit)? = null ): GridPanel { val gridPanel = GridPanel( autoColumns, autoRows, autoFlow, templateColumns, templateRows, templateAreas, @@ -282,8 +282,8 @@ open class GridPanel( class GridWrapper( delegate: Component, private val columnStart: Int? = null, private val rowStart: Int? = null, private val columnEnd: String? = null, private val rowEnd: String? = null, - private val area: String? = null, private val justifySelf: GRIDJUSTIFY? = null, - private val alignSelf: GRIDALIGN? = null, + private val area: String? = null, private val justifySelf: GridJustify? = null, + private val alignSelf: GridAlign? = null, classes: Set<String> = setOf() ) : WidgetWrapper(delegate, classes) { diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt index d0176481..0700e88a 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt @@ -37,7 +37,7 @@ import pl.treksoft.kvision.core.Container * @param init an initializer extension function */ open class HPanel( - wrap: FLEXWRAP? = null, justify: FLEXJUSTIFY? = null, alignItems: FLEXALIGNITEMS? = null, spacing: Int? = null, + wrap: FlexWrap? = null, justify: FlexJustify? = null, alignItems: FlexAlignItems? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (HPanel.() -> Unit)? = null ) : FlexPanel( null, @@ -55,9 +55,9 @@ open class HPanel( * It takes the same parameters as the constructor of the built component. */ fun Container.hPanel( - wrap: FLEXWRAP? = null, - justify: FLEXJUSTIFY? = null, - alignItems: FLEXALIGNITEMS? = null, + wrap: FlexWrap? = null, + justify: FlexJustify? = null, + alignItems: FlexAlignItems? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (HPanel.() -> Unit)? = null diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt index a5b3d577..4bbca9dd 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt @@ -24,14 +24,14 @@ package pl.treksoft.kvision.panel import pl.treksoft.kvision.core.Component import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.WidgetWrapper -import pl.treksoft.kvision.html.ALIGN +import pl.treksoft.kvision.html.Align import pl.treksoft.kvision.html.TAG import pl.treksoft.kvision.html.Tag /** * Bootstrap grid sizes. */ -enum class GRIDSIZE(internal val size: String) { +enum class GridSize(internal val size: String) { XS("xs"), SM("sm"), MD("md"), @@ -46,7 +46,7 @@ internal data class WidgetParam(val widget: Component, val size: Int, val offset * The container with support for Bootstrap responsive grid layout. * * @constructor - * @param gridsize grid size + * @param gridSize grid size * @param rows number of rows * @param cols number of columns * @param align text align of grid cells @@ -54,8 +54,8 @@ internal data class WidgetParam(val widget: Component, val size: Int, val offset * @param init an initializer extension function */ open class ResponsiveGridPanel( - private val gridsize: GRIDSIZE = GRIDSIZE.MD, - private var rows: Int = 0, private var cols: Int = 0, align: ALIGN? = null, + private val gridSize: GridSize = GridSize.MD, + private var rows: Int = 0, private var cols: Int = 0, align: Align? = null, classes: Set<String> = setOf(), init: (ResponsiveGridPanel.() -> Unit)? = null ) : SimplePanel(classes) { @@ -135,8 +135,8 @@ open class ResponsiveGridPanel( (0 until cols).map { row[it] }.forEach { wp -> if (auto) { val widget = wp?.widget?.let { - WidgetWrapper(it, setOf("col-" + gridsize.size + "-" + num)) - } ?: Tag(TAG.DIV, classes = setOf("col-" + gridsize.size + "-" + num)) + WidgetWrapper(it, setOf("col-" + gridSize.size + "-" + num)) + } ?: Tag(TAG.DIV, classes = setOf("col-" + gridSize.size + "-" + num)) align?.let { widget.addCssClass(it.className) } @@ -144,9 +144,9 @@ open class ResponsiveGridPanel( } else { if (wp != null) { val s = if (wp.size > 0) wp.size else num - val widget = WidgetWrapper(wp.widget, setOf("col-" + gridsize.size + "-" + s)) + val widget = WidgetWrapper(wp.widget, setOf("col-" + gridSize.size + "-" + s)) if (wp.offset > 0) { - widget.addCssClass("col-" + gridsize.size + "-offset-" + wp.offset) + widget.addCssClass("col-" + gridSize.size + "-offset-" + wp.offset) } align?.let { widget.addCssClass(it.className) @@ -173,11 +173,11 @@ open class ResponsiveGridPanel( * It takes the same parameters as the constructor of the built component. */ fun Container.responsiveGridPanel( - gridsize: GRIDSIZE = GRIDSIZE.MD, - rows: Int = 0, cols: Int = 0, align: ALIGN? = null, + gridSize: GridSize = GridSize.MD, + rows: Int = 0, cols: Int = 0, align: Align? = null, classes: Set<String> = setOf(), init: (ResponsiveGridPanel.() -> Unit)? = null ): ResponsiveGridPanel { - val responsiveGridPanel = ResponsiveGridPanel(gridsize, rows, cols, align, classes, init) + val responsiveGridPanel = ResponsiveGridPanel(gridSize, rows, cols, align, classes, init) this.add(responsiveGridPanel) return responsiveGridPanel } diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt index d5e4cb03..423b1cde 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt @@ -26,7 +26,7 @@ import pl.treksoft.jquery.JQuery import pl.treksoft.jquery.JQueryEventObject import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.StyledComponent -import pl.treksoft.kvision.core.UNIT +import pl.treksoft.kvision.core.Unit import pl.treksoft.kvision.html.TAG import pl.treksoft.kvision.html.Tag import pl.treksoft.kvision.utils.obj @@ -34,7 +34,7 @@ import pl.treksoft.kvision.utils.obj /** * Split panel direction. */ -enum class DIRECTION(internal val dir: String) { +enum class Direction(internal val dir: String) { HORIZONTAL("horizontal"), VERTICAL("vertical") } @@ -51,8 +51,8 @@ enum class DIRECTION(internal val dir: String) { * @param init an initializer extension function */ open class SplitPanel( - private val direction: DIRECTION = DIRECTION.VERTICAL, - classes: Set<String> = setOf(), init: (SplitPanel.() -> Unit)? = null + private val direction: Direction = Direction.VERTICAL, + classes: Set<String> = setOf(), init: (SplitPanel.() -> kotlin.Unit)? = null ) : SimplePanel(classes + ("splitpanel-" + direction.dir)) { @Suppress("LeakingThis") @@ -66,8 +66,8 @@ open class SplitPanel( @Suppress("UnsafeCastFromDynamic") internal fun afterInsertSplitter() { if (children.size == 2) { - val horizontal = direction == DIRECTION.HORIZONTAL - val px = UNIT.px + val horizontal = direction == Direction.HORIZONTAL + val px = Unit.px val self = this children[0].getElementJQueryD().resizable(obj { handleSelector = "#" + splitter.id @@ -106,8 +106,8 @@ open class SplitPanel( * It takes the same parameters as the constructor of the built component. */ fun Container.splitPanel( - direction: DIRECTION = DIRECTION.VERTICAL, - classes: Set<String> = setOf(), init: (SplitPanel.() -> Unit)? = null + direction: Direction = Direction.VERTICAL, + classes: Set<String> = setOf(), init: (SplitPanel.() -> kotlin.Unit)? = null ): SplitPanel { val splitPanel = SplitPanel(direction, classes, init) this.add(splitPanel) @@ -116,7 +116,7 @@ open class SplitPanel( } } -internal class Splitter(private val splitPanel: SplitPanel, direction: DIRECTION) : Tag( +internal class Splitter(private val splitPanel: SplitPanel, direction: Direction) : Tag( TAG.DIV, classes = setOf("splitter-" + direction.dir) ) { diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/VPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/VPanel.kt index c2cb602b..eb9c138e 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/VPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/VPanel.kt @@ -36,10 +36,10 @@ import pl.treksoft.kvision.core.Container * @param init an initializer extension function */ open class VPanel( - justify: FLEXJUSTIFY? = null, alignItems: FLEXALIGNITEMS? = null, spacing: Int? = null, + justify: FlexJustify? = null, alignItems: FlexAlignItems? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (VPanel.() -> Unit)? = null ) : FlexPanel( - FLEXDIR.COLUMN, + FlexDir.COLUMN, null, justify, alignItems, null, spacing, classes ) { init { @@ -54,7 +54,7 @@ open class VPanel( * It takes the same parameters as the constructor of the built component. */ fun Container.vPanel( - justify: FLEXJUSTIFY? = null, alignItems: FLEXALIGNITEMS? = null, spacing: Int? = null, + justify: FlexJustify? = null, alignItems: FlexAlignItems? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (VPanel.() -> Unit)? = null ): VPanel { val vpanel = VPanel(justify, alignItems, spacing, classes, init) |