← Back to team overview

jessyink-team team mailing list archive

new index mode code...

 

Dear list,

I've spent a bit of time today on the index display code to try and
break it down into separate functions.

Index display is now done in three separate steps (haven't changed the
function names):
* setViewPort() which defines the numbers of lines and columns in index mode
* displayIndex(offset) which displays the index grid given a starting
point (the offset) - also resizes / positions the visible slides
* indexSetActiveSlide(slide) which greys out the slides in the grid,
hides the ones that aren't and shows the given slide as white

A function which sets the grid offset and the active slide is defined as
* indexSetPageSlide(slide) ... is useful for all key interactions in index mode.

Grid dimensions are NOT recalculated when window is resized (maybe
will look into it) and also, the packing algorithm in setViewPort only
considers the case when INDEX_COLUMNS slides are fitted across the
whole window. Means black bars top and bottom, not black bars left and
right. At the moment, will crash (I think) if heigt of one thumbnailed
slide is greater than height of the window...

Tested in Firefox, Safari and Opera, seems to be working fine but
maybe not for limit cases. Anyway, see presentation and screenshots
attached.

I'll update the ui-addition branch when I test a presentation
generated from Inkscape.

Cheers,
Egor

Attachment: packing_firefox.png
Description: PNG image

Attachment: packing_opera.png
Description: PNG image

Attachment: packing_safari.png
Description: PNG image

Attachment: JessyInk.svg
Description: image/svg


Follow ups