From 064930653f403f33bbb2b4220f56b2853c55256b Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Thu, 23 Feb 2017 20:02:36 +0100 Subject: [PATCH] fixed video overlay size --- .../figureslibres/clameursmod/clameursmod.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sites/all/modules/figureslibres/clameursmod/clameursmod.js b/sites/all/modules/figureslibres/clameursmod/clameursmod.js index 7ef2c675..111460a1 100644 --- a/sites/all/modules/figureslibres/clameursmod/clameursmod.js +++ b/sites/all/modules/figureslibres/clameursmod/clameursmod.js @@ -47,10 +47,12 @@ var winheight = $(window).height(); console.log('win :'+winwidth+' | '+winheight); - if (winwidth > winheight) { + if (winwidth < winheight) { + console.log("Width target"); var w = winwidth*0.9; var h = w*(360/640); }else{ + console.log("height target"); var h = winheight*0.9; var w = h*(640/360); } @@ -67,9 +69,17 @@ borderSize:'0', width:w, height:h, - windowSourceID:"#videoframe" + windowSourceID:"#videoframe", + functionCallOnClose:true, + functionCallAfterClose:function(){ + $('#videoframe').remove(); + } }); - } + }; + + function onCloseOverlay(){ + $('#videoframe').remove(); + }; init(); };