Hi Wagyx,
I've gone over my web pages for the simple off viewer in conjunction
with my Webview system which probably no one is using, lol.
I have the simple off viewer in a folder called offview, and it is one
level under the polyhedra folder which I'm now (or will be) using as the
base for all pages on my site.
When I made this change the follow two lines no longer find a file.
in info.js line 20 the 'images' folder now has to be in the polyhedra
folder one level up.
.append("<img width='32' height='32' src='images/icon-info.png'/>")
In off-viewer.js line 120 the 'off' folder has to be in the polyhedra
folder one level up. In this case, if the file is not available then all
that happens is a blank screen is shown instead of a tetrahedron which
doesn't matter so much.
const obj={filename:"off/U1.off"};
I see why it is happening and I don't know of a workaround other than
providing the folders. But it makes the package not entirely
encapsulated in a sub-folder.
Also I'd like to know if you've ever set an <iframe> to go full screen
on a button press and then return to normal on Escape. I've also seen
examples of using F11 to do it as well but only had partial success with
it. In the latter case F11 would only maximize the iframe and and Escape
would return its original size, if everything worked as it should.
It is not super important if you are busy and the off viewer is
incredibly fast anyway. But I like to solve problems like this at least
as a learning exercise.
On this page I've set up a window view. The Fullscreen button just opens
another page full screen, but i wouldn't necessarily have to do that.
https://www.interocitors.com/polyhedra/offwin.html?url=offview/off_test/sssC.off
Roger