aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/window
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-04-03 17:21:38 +0200
committerRobert Jaros <rjaros@finn.pl>2018-04-03 17:21:38 +0200
commit01c1d306b8df6f552949b04e88829f6730e537c7 (patch)
tree92a1439ea1e3807585cd75bdd40f6d921c668213 /src/main/kotlin/pl/treksoft/kvision/window
parent28c3db7e059982607b56efa71c3aece07f3e2794 (diff)
downloadkvision-01c1d306b8df6f552949b04e88829f6730e537c7.tar.gz
kvision-01c1d306b8df6f552949b04e88829f6730e537c7.tar.bz2
kvision-01c1d306b8df6f552949b04e88829f6730e537c7.zip
Fix window resize and z-index.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/window')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/window/Window.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/window/Window.kt b/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
index 4a7e6ded..2b1aabb7 100644
--- a/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
@@ -38,7 +38,7 @@ import pl.treksoft.kvision.modal.CloseIcon
import pl.treksoft.kvision.panel.SimplePanel
import pl.treksoft.kvision.utils.px
-internal const val DEFAULT_Z_INDEX = 1000
+internal const val DEFAULT_Z_INDEX = 900
internal const val WINDOW_HEADER_HEIGHT = 40
internal const val WINDOW_CONTENT_MARGIN_BOTTOM = 11
@@ -238,8 +238,10 @@ open class Window(
if (eid == id) {
val intWidth = (getElementJQuery()?.width()?.toInt() ?: 0) + 2
val intHeight = (getElementJQuery()?.height()?.toInt() ?: 0) + 2
+ isResizable = false
width = intWidth.px
height = intHeight.px
+ isResizable = true
content.width = (intWidth - 2).px
content.height = (intHeight - WINDOW_HEADER_HEIGHT - WINDOW_CONTENT_MARGIN_BOTTOM - 1 - 2).px
}