app/js/controllers.show.js in mangos-0.0.6 vs app/js/controllers.show.js in mangos-0.0.7

- old
+ new

@@ -7,10 +7,20 @@ function pageUrl(index) { return book.url + "/" + book.pageUrls[index - 1]; } + function squeezePortraitImage() { + var image = $("#image")[0]; + if(image.naturalWidth < image.naturalHeight) { + $("#image").css("max-width", "1000px"); + } + else { + $("#image").css("max-width", "100%"); + } + } + function preloadImage(index) { var image = new Image(); image.src = pageUrl(index); } @@ -21,10 +31,15 @@ } this.init = function() { console.log("starting show"); $("#image").attr("src", "img/blank.png"); + + //var image = $("#image")[0]; + //image.onload = squeezePortraitImage; + $("#view-show").show().addClass("current-view"); + $("title").text(book.title + " - Mangos"); //setTimeout(preloadImages, 5000); } this.render = function() { window.scrollTo(0, 0);