# HG changeset patch # User hertzhaft # Date 1299571627 -3600 # Node ID 5795b9cae183c4dd653eac94f93f81c9b4afbbee # Parent 2c401f68d577141b625e2976d44402aa65bbeb49 first step towards zoom arrows diff -r 2c401f68d577 -r 5795b9cae183 client/digitallibrary/jquery/img/down.png Binary file client/digitallibrary/jquery/img/down.png has changed diff -r 2c401f68d577 -r 5795b9cae183 client/digitallibrary/jquery/img/left.png Binary file client/digitallibrary/jquery/img/left.png has changed diff -r 2c401f68d577 -r 5795b9cae183 client/digitallibrary/jquery/img/right.png Binary file client/digitallibrary/jquery/img/right.png has changed diff -r 2c401f68d577 -r 5795b9cae183 client/digitallibrary/jquery/img/up.png Binary file client/digitallibrary/jquery/img/up.png has changed diff -r 2c401f68d577 -r 5795b9cae183 client/digitallibrary/jquery/jquery.digilib.js --- a/client/digitallibrary/jquery/jquery.digilib.js Mon Mar 07 15:16:51 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Tue Mar 08 09:07:07 2011 +0100 @@ -228,6 +228,20 @@ 'buttonSets' : ['standardSet', 'specialSet'] } }, + // arrow overlays for moving the zoomed area + 'zoomArrows' : true, + // zoom arrow image info + 'zoomArrowImg' : { + // path to arrow images (must end with a slash) + 'imagePath' : 'img/', + // minimal width of the arrow bar (pixel) + 'minwidth' : 6, + // image file names + 'up' : 'up.png', + 'down' : 'down.png', + 'left' : 'left.png', + 'right' : 'right.png' + }, // number of visible button groups 'visibleButtonSets' : 1, // is the "about" window shown? @@ -239,7 +253,7 @@ 'maxBgSize' : 10000, // parameters used by background image 'bgImgParams' : ['fn','pn','dw','dh','mo','rot'], - // space to be left free in full page display, default value is for scrollbar + // reserved space in full page display (default value accounts for vertical scrollbar) 'scalerInset' : 10 }; @@ -311,11 +325,14 @@ } } } - // store $(this) element in data, needs a deep copy + // setup $elem.data, needs "deep copy" because of nesting elemSettings = $.extend(true, {}, settings, params); data = { + // let $(this) know about $(this) :-) $elem : $elem, + // let $elem have its own copy of settings settings : elemSettings, + // and of the URL query parameters queryParams : params, // TODO: move plugins reference out of data plugins : plugins @@ -369,6 +386,8 @@ highlightButtons(data); // about window creation - TODO: could be deferred? restrict to only one item? setupAboutDiv(data); + // arrow overlays for moving zoomed detail + setupZoomArrows(data); // send setup event $(data).trigger('setup'); }); @@ -1052,6 +1071,15 @@ return $buttonsDiv; }; + // creates arrow overlays for moving the zoomed area + var setupZoomArrows = function (data) { + var $elem = data.$elem; + var settings = data.settings; + var show = settings.zoomArrows; + console.log('zoom arrows:', show); + if (!show) return; + }; + // creates HTML structure for the about view in elem var setupAboutDiv = function (data) { var $elem = data.$elem;