From 1a5c45c2a6e2e53712d70d731f85a6b990cc464b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 15 Nov 2019 09:34:24 +0100 Subject: Add "centered" property to all Modal dialogs. --- .../src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft') diff --git a/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt b/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt index e67a6f17..511dfd00 100644 --- a/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt +++ b/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt @@ -34,14 +34,15 @@ import kotlin.coroutines.resume * @param size modal window size * @param animation determines if animations are used * @param escape determines if dialog can be closed with Esc key + * @param centered determines if modal dialog is vertically centered * @param classes a set of CSS class names * @param init an initializer extension function */ open class Dialog( caption: String? = null, closeButton: Boolean = true, - size: ModalSize? = null, animation: Boolean = true, escape: Boolean = true, + size: ModalSize? = null, animation: Boolean = true, centered: Boolean = false, escape: Boolean = true, classes: Set = setOf(), init: (Dialog.() -> Unit)? = null -) : Modal(caption, closeButton, size, animation, escape, classes) { +) : Modal(caption, closeButton, size, animation, escape, centered, classes) { internal var resultCallback: ((R?) -> Unit)? = null -- cgit