aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt34
1 files changed, 3 insertions, 31 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt
index 3d1db0e7..c9317374 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt
@@ -1,33 +1,5 @@
package pl.treksoft.kvision.panel
-import com.github.snabbdom.VNode
-import pl.treksoft.kvision.core.Container
-import pl.treksoft.kvision.core.Widget
-import pl.treksoft.kvision.core.WidgetWrapper
-import pl.treksoft.kvision.html.ALIGN
-import pl.treksoft.kvision.html.TAG
-import pl.treksoft.kvision.html.Tag
-
-open class HPanel(align: ALIGN = ALIGN.NONE, classes: Set<String> = setOf()) : GridPanel(GRIDTYPE.DSG, align = align,
- classes = classes) {
-
- override fun add(child: Widget, row: Int, col: Int, size: Int, offset: Int): Container {
- return super.add(child, 0, col, size, offset)
- }
-
- override fun childrenVNodesDsg(): Array<VNode> {
- val ret = mutableListOf<VNode>()
- val rowContainer = Container(setOf("dsgrow"))
- val row = map[0]
- if (row != null) {
- for (j in 0 until cols) {
- val wp = row[j]
- val widget = wp?.widget?.let { WidgetWrapper(it, setOf("dsgcolf")) } ?:
- Tag(TAG.DIV, classes = setOf("dsgcolf"))
- rowContainer.add(widget)
- }
- }
- ret.add(rowContainer.render())
- return ret.toTypedArray()
- }
-}
+open class HPanel(justify: FLEXJUSTIFY? = null, alignItems: FLEXALIGNITEMS? = null,
+ classes: Set<String> = setOf()) : FlexPanel(null,
+ null, justify, alignItems, null, classes)