Skip to content

Commit

Permalink
Merge pull request #10 from jasonheckman/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
asmecher committed Apr 11, 2012
2 parents 4aaf1f2 + 7e5b3bf commit 8192087
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion js/controllers/linkAction/LinkActionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ jQuery.pkp.controllers.linkAction = jQuery.pkp.controllers.linkAction || { };
var $sourceElement = $(sourceElement);
$sourceElement.imgPreview({
preloadImages: false,
imgCSS: { width: 300 }
imgCSS: {
width: '300px'

}
});
};

Expand Down
3 changes: 2 additions & 1 deletion js/lib/jquery/plugins/jquery.imgpreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
$container = $('<div/>').attr('id', s.containerID)
.append('<img/>').hide()
.css('position','absolute')
.css('z-index','10005')

This comment has been minimized.

Copy link
@jnugent

jnugent Apr 11, 2012

Member

Is this the best way to do this? There is a mechanism to pass in CSS for the image as a map, via the imgCSS parameter (see line 156 in LinkActionHandler), which is applied on line 44 in the plugin to the container it creates. We'll lose this mod if we upgrade the plugin and forget to migrate it.

.appendTo('body');
}

Expand All @@ -55,7 +56,7 @@
$container.css({
top: e.pageY + s.distanceFromCursor.top + 'px',
left: e.pageX + s.distanceFromCursor.left + 'px'
});
});
})
.hover(function(){
var link = this;
Expand Down

0 comments on commit 8192087

Please sign in to comment.