You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Realtime graph popout windows rely on the realtimePopout variable being true in order execute setRealtimeWindowSize().
realtimePopout is set twice as far as I can see, once in graph_realtime.php (var realtimePopout = true;) and again in realtime.js (var realtimePopout = false;)
Setting the realtime.js one to true fixes the resizing problem, but I'm not sure if the original intention was that the resize only happens when the window is a smaller than than the #rtfilter and #rimage elements?
If so, this one liner should only resize if the window is too small:
Start a realtime graph where the graph template size is sufficiently large that it won't fit in the default popped window size. I use 700x300 for example.
Expected behavior
The popup window should resize to fit the #rtfilter and #rimage elements
Desktop (please complete the following information)
OS: Windows 10
Browser Chrome
Version 81.0.4044.138 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered:
Seems a sound fix as far as I can see, I will have to verify what the intention was with the variable, but I suspect it was to set the window dimensions manually rather than just relying on the last browser state.
Realtime graph window not resizing
Realtime graph popout windows rely on the
realtimePopout
variable being true in order executesetRealtimeWindowSize()
.realtimePopout is set twice as far as I can see, once in graph_realtime.php (
var realtimePopout = true;
) and again in realtime.js (var realtimePopout = false;
)Setting the realtime.js one to true fixes the resizing problem, but I'm not sure if the original intention was that the resize only happens when the window is a smaller than than the #rtfilter and #rimage elements?
If so, this one liner should only resize if the window is too small:
realtimePopout = $('#rtfilter').outerHeight() + 60 + $('#rimage').outerHeight() + 30 > window.innerHeight || $('#rimage').outerWidth() + 40 > window.innerWidth ? true : false;
If the window is too small then it will expand to fit the graph, if you manually resize it larger then it'll return false and keep the window size.
I put it in the .done handler after the graph is loaded and it seems to work fine:
To Reproduce
Steps to reproduce the behavior:
Start a realtime graph where the graph template size is sufficiently large that it won't fit in the default popped window size. I use 700x300 for example.
Expected behavior
The popup window should resize to fit the #rtfilter and #rimage elements
Desktop (please complete the following information)
OS: Windows 10
Browser Chrome
Version 81.0.4044.138 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: