From 95fa69ec901243d2f496a692b2f5d8a61ce5e053 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 29 Jan 2018 20:59:14 +0100 Subject: Change order of parameters for responsive grid --- src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin') 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>() 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): 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 -- cgit