Scrolling issue with JavaFx webkit browser


We are developing a java application for which we use the JavaFx webkit browser (JavaFx). Everything is working perfect with the GoJs library except for the scrolling: if the user drags the scrollbar, during scrolling the canvas is blanked; when the scrollbar is released everything is restored again.

We made a standalone browser based on JavaFx which shows the issue. I placed this standalone browser on wetransfer: wetransfer Running this browser (java -jar jafafx.browser.jar) will highlight the issue by showing one of the examples on your webpage. It has a button to enable Firebug Lite, so some inspection/debugging over the page can be done.

Note that JavaFx is part of the Java RE. The following user agents are reported:
with Java7:
Mozilla/5.0 (Linux x86_64) AppleWebKit/535.14 (KHTML, like Gecko) JavaFX/2.2 Safari/535.14
with Java8:
Mozilla/5.0 (Linux x86_64) AppleWebKit/537.44 (KHTML, like Gecko) JavaFX/8.0 Safari/537.44

Any suggestions?

Thanks, Paul.

Thanks for the sample app – we don’t have any experience with JavaFx. We’ll see if we can figure out what’s going on.

What version of GoJS are you using?

Can you upgrade to 1.4.20 and then add this line, right after you initialize your diagram?

myDiagram.Xv = false;

And tell me if that changes anything?

That line really should be:

myDiagram.viewportOptimizations = false;

which is a non-public flag in GoJS, but I didn’t expose it right so you’ll have to reference the shortened name which will only work in 1.4.20. Later versions of 1.4 will let you use .viewportOptimizations

I think this is happening because their canvas implementation of double-buffering is not completely following the specification, but that’s just a guess. Let me know if anything changes when you’re using 1.4.20 and setting myDiagram.Xv = false

We were using an older version; but I upgraded to 1.4.20 now.

I added the diagram.Xv = false and this indeed solved the problem concerning scrolling. For which aspects is there a slowdown to be expected? (For the Org Chart Static setting this flag to false caused that the small overview is not updated during scrolling but at the moment we are not using this feature).

Panning with a large number of nodes on the screen (many hundreds) may see a decrease in performance.