# HG changeset patch # User robcast # Date 1328570661 -3600 # Node ID 862d2ae56c200287c78d566b125d4192a7fc4b14 # Parent 4fcc85d4db8fe35497b1eac93f1fcd3838118cb5 fixed problems with new events and some browsers. diff -r 4fcc85d4db8f -r 862d2ae56c20 webapp/src/main/webapp/jquery/jquery.digilib.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.js Mon Feb 06 23:03:17 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Tue Feb 07 00:24:21 2012 +0100 @@ -192,6 +192,8 @@ data.hasPreviewBg = false; // check if browser supports AJAX-like URL-replace without reload data.hasAsyncReload = (typeof history.replaceState === 'function'); + // check if browser sets complete on cached images + data.hasCachedComplete = ! $.browser.mozilla; // check digilib base URL if (elemSettings.digilibBaseUrl == null) { if (isFullscreen) { @@ -794,7 +796,10 @@ var imgurl = getScalerUrl(data); $img.attr('src', imgurl); // trigger load event if image is cached. Doesn't work with Firefox!! - //if ($img.prop('complete')) $img.trigger('load'); + if (data.hasCachedComplete && $img.prop('complete')) { + console.debug("cached img.load"); + $img.trigger('load'); + } if (data.scalerFlags.clip != null || data.scalerFlags.osize != null) { // we need image info, do we have it? if (data.imgInfo == null) { @@ -1314,9 +1319,8 @@ $img.css('visibility', 'visible'); $scaler.css({'opacity' : '1', 'background-image' : 'none'}); data.hasPreviewBg = false; - // unhide marks FIXME! - //data.$elem.find('div.mark').show(); - $(data).trigger('redisplay'); + // unhide marks etc. + updateDisplay(data); return false; } // get old zoom area (screen coordinates) diff -r 4fcc85d4db8f -r 862d2ae56c20 webapp/src/main/webapp/jquery/jquery.digilib.marks.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.marks.js Mon Feb 06 23:03:17 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.marks.js Tue Feb 07 00:24:21 2012 +0100 @@ -57,7 +57,7 @@ // plugin installation called by digilib on plugin object. var install = function(plugin) { digilib = plugin; - console.debug('installing stub plugin. digilib:', digilib); + console.debug('installing marks plugin. digilib:', digilib); // import geometry classes geom = digilib.fn.geometry; // add defaults, actins, buttons @@ -79,7 +79,7 @@ }; var handleUpdate = function(evt) { - console.debug("stub: handleUpdate"); + console.debug("marks: handleUpdate"); var data = this; renderMarks(data); };