# HG changeset patch # User hertzhaft # Date 1300376639 -3600 # Node ID 971b7122930fd296f0605dfb2c7dd952bbc23b87 # Parent a5a460afb912a65b725ec5fe24eb6d67114a0e1f arrows: got basic functionality working diff -r a5a460afb912 -r 971b7122930f client/digitallibrary/jquery/jquery.digilib.css --- a/client/digitallibrary/jquery/jquery.digilib.css Thu Mar 17 12:20:36 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.css Thu Mar 17 16:43:59 2011 +0100 @@ -66,13 +66,13 @@ opacity: 0.5; } -div.region { +div.digilib div.region { color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; } -div.region a.regionnumber { +div.digilib div.region a.regionnumber { color: white; text-decoration: none; font-weight: bold; @@ -84,11 +84,11 @@ display: inline-block; } -div.regioncontent { +div.digilib div.regioncontent { display: none; } -div.regionHTML { +div.digilib div.regionHTML { display: none; position: absolute; top: 100px; @@ -101,7 +101,7 @@ z-index: 1000; } -div.regionHTML a { +div.digilib div.regionHTML a { color: white; text-decoration: none; font-size: 11px; @@ -127,15 +127,18 @@ margin-bottom: 20px; } -div.arrow { +div.digilib div.arrows { + display: none; +} + +div.digilib div.arrows div.button { position: absolute; text-align: center; background-color: black; opacity: 0.08; - display: none; -} + } -div.arrow:hover { +div.digilib div.arrows div.button:hover { opacity: 0.5; } @@ -149,12 +152,14 @@ z-index: 100; } -div.digilib.dl_fullscreen div.button:hover { +div.digilib.dl_fullscreen div.buttons div.button:hover { background-image: url('img/fullscreen/corona.png'); + background-repeat: no-repeat; } div.digilib.dl_fullscreen div.button-on { background-image: url('img/fullscreen/whitedisc.png'); + background-repeat: no-repeat; } div.digilib.dl_fullscreen div.birdview { @@ -178,7 +183,7 @@ z-index: 100; } -div.digilib.dl_embedded div.button:hover { +div.digilib.dl_embedded div.buttons div.button:hover { background-color: black; } @@ -191,3 +196,4 @@ bottom: 0px; right: 0px; } + diff -r a5a460afb912 -r 971b7122930f client/digitallibrary/jquery/jquery.digilib.geometry.js --- a/client/digitallibrary/jquery/jquery.digilib.geometry.js Thu Mar 17 12:20:36 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.geometry.js Thu Mar 17 16:43:59 2011 +0100 @@ -185,6 +185,12 @@ this.y += pos.y; return this; }; + // adds pos to the dimensions + that.enlarge = function(pos) { + this.width += pos.x; + this.height += pos.y; + return this; + }; // sets the lower right corner to position pos that.setPt2 = function(pos) { this.width = pos.x - this.x; diff -r a5a460afb912 -r 971b7122930f client/digitallibrary/jquery/jquery.digilib.js --- a/client/digitallibrary/jquery/jquery.digilib.js Thu Mar 17 12:20:36 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Thu Mar 17 16:43:59 2011 +0100 @@ -168,22 +168,22 @@ }, up : { onclick : ["moveZoomArea", 0, -1], - tooltip : "move up", + tooltip : "move zoom area up", icon : "up.png" }, down : { onclick : ["moveZoomArea", 0, 1], - tooltip : "move down", + tooltip : "move zoom area down", icon : "down.png" }, left : { onclick : ["moveZoomArea", -1, 0], - tooltip : "move left", + tooltip : "move zoom area left", icon : "left.png" }, right : { onclick : ["moveZoomArea", 1, 0], - tooltip : "move right", + tooltip : "move zoom area right", icon : "right.png" }, SEP : { @@ -1061,7 +1061,7 @@ $button.addClass('button-' + buttonName); $img.attr('src', icon); // create handler for the buttons - $a.bind('click.digilib', (function () { + $button.bind('click.digilib', (function () { // we create a new closure to capture the value of action if ($.isArray(action)) { // the handler function calls digilib with action and parameters @@ -1120,58 +1120,50 @@ var setupZoomArrows = function (data) { var $elem = data.$elem; var settings = data.settings; - var show = settings.zoomArrows; + var show = settings.showZoomArrows; console.log('zoom arrows:', show); if (!show) return; - data.$arrows = {}; - var $arrows = data.$arrows; - var info = settings.zoomArrowsInfo; - $.each(['up','down','left','right'], function(i, s){ - var src = info.imagePath + info[s]; - var $div = $('
'); - var $img = $('