aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/window
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/window')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/window/Window.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/window/Window.kt b/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
index 2b1aabb7..bdfb2c0f 100644
--- a/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
@@ -36,6 +36,7 @@ import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
import pl.treksoft.kvision.modal.CloseIcon
import pl.treksoft.kvision.panel.SimplePanel
+import pl.treksoft.kvision.utils.obj
import pl.treksoft.kvision.utils.px
internal const val DEFAULT_Z_INDEX = 900
@@ -230,6 +231,7 @@ open class Window(
}
}
+ @Suppress("UnsafeCastFromDynamic")
private fun checkResizablEventHandler() {
if (isResizable) {
isResizeEvent = true
@@ -244,6 +246,12 @@ open class Window(
isResizable = true
content.width = (intWidth - 2).px
content.height = (intHeight - WINDOW_HEADER_HEIGHT - WINDOW_CONTENT_MARGIN_BOTTOM - 1 - 2).px
+ this.dispatchEvent("resizeWindow", obj {
+ detail = obj {
+ this.width = intWidth
+ this.height = intHeight
+ }
+ })
}
}
} else if (isResizeEvent) {