Skip to content

Commit

Permalink
ControlBuilder: Add placeholder for float block layout elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Dale committed Feb 26, 2013
1 parent c55185b commit 3f93770
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions modules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js
Expand Up @@ -467,7 +467,7 @@ mw.PlayerControlBuilder.prototype = {
this.doHybridNativeFullscreen();
return ;
} else {
// make the player traget or iframe fullscreen
// make the player target or iframe fullscreen
this.doContextTargetFullscreen();
}
}
Expand Down Expand Up @@ -544,7 +544,14 @@ mw.PlayerControlBuilder.prototype = {
})
.data(
'isFullscreen', true
);
)
.after(
// add a placeholder div to retain page layout in float / block based pages.
$('<div>').addClass('player-placeholder').css({
'width': this.orginalTargetElementLayout.width,
'height': this.orginalTargetElementLayout.height
})
)

var updateTargetSize = function() {
context.scroll(0, 0);
Expand Down Expand Up @@ -626,6 +633,8 @@ mw.PlayerControlBuilder.prototype = {
}).trigger( 'resize' )
// update player size if needed:
_this.embedPlayer.applyIntrinsicAspect();
// remove placeholder
$target.siblings( '.player-placeholder').remove();
}
// Restore any parent absolute pos:
$.each( _this.parentsAbsoluteList, function(inx, $elm) {
Expand Down

0 comments on commit 3f93770

Please sign in to comment.