Assets: No need to calculate preview aspect ratio anymore
No longer used since we went full width
This commit is contained in:
parent
386571157a
commit
e3f1f101e2
@ -141,21 +141,6 @@ script(type="text/javascript").
|
||||
navigateTree();
|
||||
});
|
||||
|
||||
// Auto-scale the image preview to the right aspect ratio
|
||||
var node_preview = document.getElementById("node-preview-thumbnail");
|
||||
|
||||
if (node_preview) {
|
||||
node_preview.addEventListener('load', function() {
|
||||
var preview_aspect = this.naturalWidth / this.naturalHeight
|
||||
|
||||
if (preview_aspect > 1.0){
|
||||
$('.node-preview, .node-preview-thumbnail').css({'max-height': 'auto', 'width': '100%'});
|
||||
$('.node-preview img').css({'max-height': '100%'});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$('#node-overlay').click(function(){
|
||||
$(this).removeClass('active').hide().html();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user