cheminfo / jsme

19 stars 5 forks source link

rendering jsme in a hidden iframe and label problems #24

Closed lpatiny closed 6 years ago

lpatiny commented 6 years ago

We have an annoying problem because we display JSME in hidden iframe on the press of a button but the rendering of the button and of the atoms are not correct.

A small test case is attached even if the effect is not that important.

In chrome: image

In firefox: image

In our application this is really a big problem and we could not find a way to circumvent this limitation. I guess that when there is a hidden iframe the information about the size is wrong or maybe the resolution and there is a calculation mistake.

iframe.html.zip

lpatiny commented 6 years ago

new method was added in commit bcdc8f0d475eb72c2d75d20afae0b7ca4ebde273

 JSApplet.JSME.clearFontCache(); // solve the problem of hidden JSME that are displayed
 jsmeApplet.setSize(width, height);