Hello,
I am trying to build a scale ruler on a flat partial pano.
So I have a plugin element that resizes according to view.fov in an onviewchange event.
It works as long as the window (browser window) is not resized.
When the window is resized vertically by the user, the scale ruler doesn't change size (the view.fov stays same), but the actual pano changes size, so relative size is not right and ruler is useless. Resizing the window horizontally doesn't seem to make a problem.
I need this to work whatever the window size.
If I could have the current zoom value I would use that instead of fov and logically that would be ok.
Alternatively, the solution is probably not to have the pano resize inside the window when the window is resized. I am confident that is the solution but could not find the way to do it.
Or, maybe, there is another way to do this altogether that I haven't thought about.
Thanks for helping on this!
The code is below
Variable its_size is visually defined so the ruler is the length I want (for example 10 m).