Browse Source

Fixed video bottom overflow in certain window sizes.

pull/23/head
Simon Eisenmann 11 years ago
parent
commit
5090105177
  1. 7
      static/js/directives/audiovideo.js

7
static/js/directives/audiovideo.js

@ -306,8 +306,11 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ @@ -306,8 +306,11 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
var singleVideoHeight = Math.ceil(singleVideoWidth/aspectRatio);
var newContainerWidth = (videosPerRow*singleVideoWidth);
var newContainerHeight = Math.ceil(videos.length/videosPerRow)*singleVideoHeight;
if (newContainerHeight*1.3 <= innerHeight) {
newContainerHeight = newContainerHeight*1.3;
if (newContainerHeight > innerHeight) {
var tooHigh = (newContainerHeight-innerHeight) / Math.ceil(videos.length / videosPerRow);
singleVideoHeight -= tooHigh;
singleVideoWidth = singleVideoHeight * aspectRatio;
newContainerHeight = innerHeight;
}
/*
console.log("space", space);

Loading…
Cancel
Save