I have a borderpane with a stackpane in the center...
# tornadofx
g
I have a borderpane with a stackpane in the center. On the stackpane I have an imageview (plus a few other things that are not important). I'm trying to get the imageview to scale to the window size so that it always fits within its pane. StackOverflow suggested binding fitWidth and fitHeight to the scene's width and height and it sort of works, but it cuts of the bottom of the image (I assume because of som stuff on top of the borderpane). I tried to bind the properties to the stackpane's width and height instead, but it does not do anything. I tried using onChange() instead of bind() and manually assigning, but the imageview just ignores it. What's even weirder is if I set the fitWidth/Height from within the scene's Width/Height onChange it works! What the hell am I missing?