Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

Commit

Permalink
Fix oversized previews
Browse files Browse the repository at this point in the history
  • Loading branch information
TheReverend403 committed Jul 3, 2016
1 parent 2ca31a6 commit 829bfb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions resources/assets/js/thumbnailhover.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ this.imagePreview = function () {

$img.css("top", (trc_y - $img.height()) + "px")
.css("left", (trc_x - $img.width()) + "px")
.css("z-index", 1000)
.css("max-width", 512);
.css("z-index", 1000);
};

$("a.preview").hover(function (e) {
Expand All @@ -45,7 +44,7 @@ this.imagePreview = function () {
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "<br/>" + this.t : "";
$("body").append("<p id='preview'><img src='" + this.href + "' alt='Preview' />" + c + "</p>");
$("body").append("<p id='preview'><img src='" + this.href + "' alt='Preview' style='max-width:512px; max-height:512px;' />" + c + "</p>");
callback(e);
$("#preview").fadeIn("fast");
},
Expand Down

0 comments on commit 829bfb2

Please sign in to comment.