Page 1 of 1

Graph popup window incorrectly sized

Posted: Fri Mar 14, 2008 2:08 pm
by mvpel
Hello!

I just got my new Meteohub from Ambient Weather on Wednesday, and it's GREAT to be able to shut down my creaky old PC and still update WeatherUnderground! My station is at this link.

WUHU was causing my PC to bluescreen, and FreeWX-Wi wedged and never worked again even after remove & reinstall, but this little box is working just great!

In the manage and define graphs sections, when you select \"display\" to preview a graph, the popup window starts at an incorrect size under most circumstances that I've been able to test.

My 1024x400 graph popped up at 66% scale at 684x267 pixels.

A 1024x440 => 684x294, also 66% scale.

Likewise, the 400x400 radar graph appeared scaled 95% at 383x383, and in a window almost twice as wide as necessary.

Since the window.open() call specifies the size, this should be easy enough to remedy - perhaps in the displayGraph() function, instead of hardcoding \"width=700,height=400\" create a second array:

var graphsize = new Array(9); graphsize[0] = \"width=1044,height=420\"; ... and so on ...

The window size needs to be specified slightly larger than the image size to accommodate borders and controls. The 400x400 image has only 383 vertical pixels in a 400-pixel-high window, so adding 20 to the specified width and height numbers should work out fine.

I'm using Firefox 2.0.12, the latest available.