Mercurial > hg > digilib-old
changeset 743:05665cc70a5f jquery
zoom-drag background follows rotation and mirror
author | robcast |
---|---|
date | Wed, 02 Feb 2011 22:28:36 +0100 |
parents | 2b6d3ef57d68 |
children | 95e6dc1b34ec |
files | client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js Wed Feb 02 21:11:50 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Wed Feb 02 22:28:36 2011 +0100 @@ -640,16 +640,21 @@ }; // returns URL for bird's eye view image - var getBirdImgUrl = function (data) { + var getBirdImgUrl = function (data, moreParams) { var settings = data.settings; var birdDivOptions = { dw : settings.birdDivWidth, dh : settings.birdDivHeight }; - var birdSettings = $.extend({}, settings, birdDivOptions); + var birdSettings = jQuery.extend({}, settings, birdDivOptions); // use only the relevant parameters - var url = settings.scalerBaseUrl + '?' + - getParamString(birdSettings, settings.birdDivParams); + if (moreParams == null) { + var params = getParamString(birdSettings, settings.birdDivParams, defaults); + } else { + var params = getParamString(birdSettings, + settings.birdDivParams.concat(moreParams), defaults); + } + var url = settings.scalerBaseUrl + '?' + params; return url; }; @@ -1377,7 +1382,8 @@ // correct offset because background is relative var scalePos = geom.position($scaler); fullRect.addPosition(scalePos.neg()); - scalerCss['background-image'] = 'url(' + getBirdImgUrl(data) + ')'; + var url = getBirdImgUrl(data, ['rot', 'mo']); + scalerCss['background-image'] = 'url(' + url + ')'; scalerCss[data.bgSizeName] = fullRect.width + 'px ' + fullRect.height + 'px'; scalerCss['background-position'] = fullRect.x + 'px '+ fullRect.y + 'px'; } else {