Commit 5e48f328 authored by Taddeus Kroes's avatar Taddeus Kroes

Added default image height/width ratio to prevent sudden shift of details window on image load

parent 1ce0515e
......@@ -227,6 +227,7 @@ ProgramDetailsView = Backbone.View.extend(
@alignMiddle()
# Align again after images are loaded
@$('.content img').load(-> $(@).css(height: 'auto'))
@$('.content img').load(=> @alignMiddle())
)
else
......
......@@ -254,6 +254,7 @@ $loader-size: 66px
$details-width: 500px
$details-initial-offset: 150px
$img-ratio: 310px / 550px
.program-details .content
position: absolute
......@@ -272,6 +273,11 @@ $details-initial-offset: 150px
*
max-width: $details-width
// Set default image height, to be overwritten with 'auto' when the image
// is loaded. This prevents a shift of the details window on image load.
img
height: $details-width * $img-ratio
.properties
padding-left: 15px
margin-top: 1px
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment