cljfx

https://github.com/cljfx/cljfx
jrwdunham 2020-06-10T20:59:14.143500Z

I'm trying to figure out how to make a :fx/type :scroll-pane scroll to the bottom (`:vvalue 1.0`) whenever a new child is added to the :children of the :fx/type :v-box that is the value of the scroll-pane's :content. Could somebody please advise?

vlaaad 2020-06-10T21:59:58.145600Z

@jrwdunham my solution so far

vlaaad 2020-06-10T22:01:06.146900Z

the idea is to just force scroll pane scroll to bottom whenever its viewport bounds change — this happens when nodes are added.

vlaaad 2020-06-10T22:03:51.149600Z

this might be a problem if nodes inside the scroll pane can be resized themselves, I don't have anything better in my mind right now. I tried to go with observing content's children list, but that seemed to update scroll too early, so it first scrolled to bottom and then updated the scroll pane...