diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-01-29 20:59:14 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-01-29 20:59:14 +0100 |
commit | 95fa69ec901243d2f496a692b2f5d8a61ce5e053 (patch) | |
tree | c452e5d4e19aee4da4db160488111b9711079bda /src/main/kotlin | |
parent | d80fcaadad307070509fb6a4e2e41f5929be24ac (diff) | |
download | kvision-95fa69ec901243d2f496a692b2f5d8a61ce5e053.tar.gz kvision-95fa69ec901243d2f496a692b2f5d8a61ce5e053.tar.bz2 kvision-95fa69ec901243d2f496a692b2f5d8a61ce5e053.zip |
Change order of parameters for responsive grid
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt index 0a89de99..f4630298 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt @@ -31,7 +31,7 @@ open class ResponsiveGridPanel( internal val map = mutableMapOf<Int, MutableMap<Int, WidgetParam>>() private var auto: Boolean = true - open fun add(child: Component, row: Int, col: Int, size: Int = 0, offset: Int = 0): ResponsiveGridPanel { + open fun add(child: Component, col: Int, row: Int, size: Int = 0, offset: Int = 0): ResponsiveGridPanel { val cRow = if (row < 0) 0 else row val cCol = if (col < 0) 0 else col if (row > rows - 1) rows = cRow + 1 @@ -43,7 +43,7 @@ open class ResponsiveGridPanel( } override fun add(child: Component): ResponsiveGridPanel { - return this.add(child, 0, this.cols) + return this.add(child, this.cols, 0) } override fun addAll(children: List<Component>): ResponsiveGridPanel { @@ -68,7 +68,7 @@ open class ResponsiveGridPanel( return this } - open fun removeAt(row: Int, col: Int): ResponsiveGridPanel { + open fun removeAt(col: Int, row: Int): ResponsiveGridPanel { map[row]?.remove(col) refreshRowContainers() return this |