Bugfix: Image position wasn't always right
This commit is contained in:
parent
7030b7657e
commit
c6c6a2e808
2
js/view.js
Normal file → Executable file
2
js/view.js
Normal file → Executable file
@ -83,7 +83,7 @@ function loadPhotoInfo(photoID) {
|
||||
headerTitle.html(data.title);
|
||||
|
||||
image_view.attr("data-id", photoID);
|
||||
if (isPhotoSmall(data)) image_view.html("").append("<div id='image' class='small' style='background-image: url(" + data.url + "); width: " + data.width + "px; height: " + data.height + "px; margin-top: -" + parseInt(data.height/2) + "px; margin-left: -" + data.width/2 + "px;'></div>");
|
||||
if (isPhotoSmall(data)) image_view.html("").append("<div id='image' class='small' style='background-image: url(" + data.url + "); width: " + data.width + "px; height: " + data.height + "px; margin-top: -" + parseInt((data.height/2)-20) + "px; margin-left: -" + data.width/2 + "px;'></div>");
|
||||
else image_view.html("").append("<div id='image' style='background-image: url(" + data.url + "); top: 70px; right: 30px; bottom: 30px; left: 30px;'></div>");
|
||||
image_view.removeClass("fadeOut").addClass("fadeIn").show();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user