From 75b2147cd233bd676959c640671e6bd77daa7d8a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 2 May 2013 19:06:45 +0400 Subject: [PATCH] added marked image navigation and some cleanup... Signed-off-by: Alex A. Naanou --- ui/index.html | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/ui/index.html b/ui/index.html index eba544a0..a286958e 100755 --- a/ui/index.html +++ b/ui/index.html @@ -366,7 +366,9 @@ function createImage(n){ return $('
') } } -// a cache-enabled version of create image... + +// This will create a set of new images, reusing a list of existing +// elements if given. // XXX do we need this??? function createImages(need, have){ have = have == null ? [] : have @@ -387,7 +389,6 @@ function createImages(need, have){ } } - function createRibbon(){ return $('
') } @@ -527,6 +528,10 @@ function centerImage(image, mode){ * Infinite ribbon machinery */ +// XXX need mechanics to populate the images or to connect such +// functionality... +// ...this is to be done in the loader... + // NOTE: negative left or right will contract the ribbon... function extendRibbon(left, right, ribbon){ ribbon = ribbon == null ? @@ -564,6 +569,9 @@ function extendRibbon(left, right, ribbon){ } +// Roll the ribbon n positions to the left. +// +// NOTE: if n is negative the ribbon will be rolled right. // NOTE: rollRibbon(N, R) is equivalent to extendRibbon(-N, N, R) // NOTE: this will return a single list of relocated elements... function rollRibbon(n, ribbon){ @@ -609,10 +617,18 @@ function lastImage(){ function nextMarkedImage(){ - // XXX + return centerImage( + focusImage( + // pre marked-only mode... + //$('.current.image').next('.marked.image'))) + $('.current.image').next('.marked.image:visible'))) } function prevMarkedImage(){ - // XXX + return centerImage( + focusImage( + // pre marked-only mode... + //$('.current.image').prev('.marked.image'))) + $('.current.image').prev('.marked.image:visible'))) }