Mercurial > hg > digilib-old
changeset 856:5795b9cae183 jquery
first step towards zoom arrows
author | hertzhaft |
---|---|
date | Tue, 08 Mar 2011 09:07:07 +0100 |
parents | 2c401f68d577 |
children | 7ebdc106a61a |
files | client/digitallibrary/jquery/img/down.png client/digitallibrary/jquery/img/left.png client/digitallibrary/jquery/img/right.png client/digitallibrary/jquery/img/up.png client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 5 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;