diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-10-13 03:37:40 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-10-13 03:37:40 +0200 |
commit | ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c (patch) | |
tree | 7cac3c5449eb8aa398b279d62d9a67ed34fa4115 /src/main/kotlin/pl/treksoft/kvision/panel | |
parent | 470953c78c2509224bb452c16f8bbea54e53b3d7 (diff) | |
download | kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.tar.gz kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.tar.bz2 kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.zip |
Major refactoring of the multi-platform components.
Dependencies upgrade.
A lot of code style fixes.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt | 4 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt index d22a285b..310d4d49 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt @@ -104,7 +104,7 @@ open class FlexPanel( /** * CSS flexbox direction. */ - var direction by refreshOnUpdate(direction, { refreshSpacing(); refresh() }) + var direction by refreshOnUpdate(direction) { refreshSpacing(); refresh() } /** * CSS flexbox wrap mode. */ @@ -124,7 +124,7 @@ open class FlexPanel( /** * The spacing between columns/rows. */ - var spacing by refreshOnUpdate(spacing, { refreshSpacing(); refresh() }) + var spacing by refreshOnUpdate(spacing) { refreshSpacing(); refresh() } init { @Suppress("LeakingThis") diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt index edcf5789..7a5b07d6 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt @@ -62,7 +62,7 @@ open class ResponsiveGridPanel( /** * Text align of grid cells. */ - var align by refreshOnUpdate(align, { refreshRowContainers() }) + var align by refreshOnUpdate(align) { refreshRowContainers() } internal val map = mutableMapOf<Int, MutableMap<Int, WidgetParam>>() private var auto: Boolean = true @@ -86,7 +86,7 @@ open class ResponsiveGridPanel( val cCol = maxOf(col, 0) if (row > rows - 1) rows = cRow + 1 if (col > cols - 1) cols = cCol + 1 - map.getOrPut(cRow, { mutableMapOf() })[cCol] = WidgetParam(child, size, offset) + map.getOrPut(cRow) { mutableMapOf() }[cCol] = WidgetParam(child, size, offset) if (size > 0 || offset > 0) auto = false refreshRowContainers() return this |