aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-22 12:43:43 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-22 12:43:43 +0100
commite40c13c62de806169368adc7c2c4212f7df6413b (patch)
tree250e39d407cd2c6ef19c9a8ea0176a3215a4a818 /src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
parent1aefed336f9ef305f59d3668abc8a39c550e921d (diff)
downloadkvision-e40c13c62de806169368adc7c2c4212f7df6413b.tar.gz
kvision-e40c13c62de806169368adc7c2c4212f7df6413b.tar.bz2
kvision-e40c13c62de806169368adc7c2c4212f7df6413b.zip
Property values delegated to a map (idea by tieskedh)
Closes #2
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
index f913fac1..d9cd0e8e 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
@@ -89,11 +89,7 @@ open class Modal(
/**
* Determines if animations are used.
*/
- var animation = animation
- set(value) {
- field = value
- refresh()
- }
+ var animation by refreshOnUpdate(animation)
private val dialog = ModalDialog(size)
private val header = SimplePanel(setOf("modal-header"))
@@ -260,11 +256,7 @@ internal class ModalDialog(size: MODALSIZE?) : SimplePanel(setOf("modal-dialog")
/**
* Modal window size.
*/
- var size = size
- set(value) {
- field = value
- refresh()
- }
+ var size by refreshOnUpdate(size)
override fun getSnClass(): List<StringBoolPair> {
val cl = super.getSnClass().toMutableList()