Slide show display time configurable
Would it be an option to user configure the time to display a page in slideshow (autoscroll) mode ? I have 10 graphs on one page and the current timeout (scrollInterval = 1000 ) does not allow the page to scroll all the way to the bottom of the page.
I guess adding a user_pref 'slideInterval' (int)
And then change view.php line 368 to someting like
var scrollInterval = <?PHP echo $slideInterval;?>;
That was the incorrect place to make changes.
I guess I found the issue
The autoscroll gets the window height on page load, which is -remember, I'm guessing - [be627fc7315]before[/be627fc7315] the images are loaded. This should not be an issue, if the [be627fc7315]img[/be627fc7315] tags contains a height value (which is not the case), so the height calculation is based upon the the body containing [be627fc7315]img[/be627fc7315] placeholders + [be627fc7315]tr[/be627fc7315] space.
So either setting [be627fc7315]img height[/be627fc7315] or recalculating the height after the 1st scroll attempt will probably solve the problem... I'll experiment a bit further with this.
That might not be a viable solution as the true image heights are not known until the graphs are rendered. The dimensions we hand off to rrdtool are for the graph area, and do not include the dimensions of the legends, titles, etc. We could possibly have netmrg remember the dimensions of the image when it was last rendered, though.
I made some modifications to the code to get this working in Crazy Browser (a Tabbed Internet Explorer clone).
I just added [b8b4e458501]scrollInterval[/b8b4e458501] to [b8b4e458501]document.body.offsetHeight[/b8b4e458501] and now the slideshow scrolls completely to the bottom of the page.
I guess that setting [b8b4e458501]< IMG ... height=..>[/b8b4e458501] would be a better solution, but it works for me ;)
Would it be possible for you to submit a bug with either a 'diff' of your changes or attach the entire file (we can do the diff then)? Bugs are maintained at http//bugs.netmrg.net
Getting features like this to work in more browsers is great! Thanks for your work!
Bug report posted Bug ID 225
I did some additional digging into this
* Mozilla works
* IE 6.x does not complete
-- Note --
Adding the height value requires some extra work... simply adding a fixed height for all the IMG tags makes the page render pretty ugly ( So I guess the proper way to do it is get the file properties before creating the img tag and insert the height based on that information.
rrdgraph [ie68fc2dd7b]does[/ie68fc2dd7b] return the X x Y height of the graphs, but this would be too late for us to use it in the image display function, or we'd have to call it twice. An alternative would be for us to call in when a template/custom graph is created/modified to get the height and width for the graph and cache the info. I think I'll submit a bug for that, because it would be very useful ;)