Permalink
Browse files

added bg for transparent images

added width and height below images in diff
  • Loading branch information...
koenpunt committed Nov 21, 2012
1 parent 4c6c248 commit 1de0ea28b957068bff7d5a5eaac82956b7529560
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -133,9 +133,12 @@
.image {
display: inline-block;
margin:50px;
- padding:1px;
max-width:400px;
+ img{
+ background: url('trans_bg.gif');
+ }
+
&.diff_removed {
img{
border: 1px solid #C00;
@@ -7,4 +7,19 @@
:javascript
$(function(){
PerLineNotes.init();
+ var w, h;
+ $('.diff_file').each(function(){
+ $('.image.diff_removed img', this).on('load', $.proxy(function(event){
+ var w = event.currentTarget.naturalWidth
+ , h = event.currentTarget.naturalHeight;
+ $('.image.diff_removed .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px');
+ }, this));
+ $('.image.diff_added img', this).on('load', $.proxy(function(event){
+ var w = event.currentTarget.naturalWidth
+ , h = event.currentTarget.naturalHeight;
+ $('.image.diff_added .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px');
+ }, this));
+
+ });
+
});

0 comments on commit 1de0ea2

Please sign in to comment.