aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/modal
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/modal')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt6
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt12
2 files changed, 3 insertions, 15 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
index 33512a7e..a3bb8d77 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
@@ -75,11 +75,7 @@ open class Confirm(
/**
* Determines if Cancel button is visible.
*/
- var cancelVisible = cancelVisible
- set(value) {
- field = value
- refreshCancelButton()
- }
+ var cancelVisible by refreshOnUpdate(cancelVisible, { refreshCancelButton() })
private val content = Tag(TAG.DIV, text, rich, align)
private val cancelButton = Button("Cancel", "remove")
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()