Browse files

make sure the wrapper is at exact same size

  • Loading branch information...
1 parent c096122 commit 0125db9d37189f0d7ec473e36239c5ecbd52ecea @azatoth committed Mar 22, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 jquery.video.js
View
9 jquery.video.js
@@ -107,6 +107,8 @@ $.widget("ui.video", {
self.element.wrapAll( $('<div />',{'class': 'ui-video-widget'}) );
self.wrapperElement = self.element.parent();
+ self.wrapperElement.width( self.element.outerWidth(true) );
+ self.wrapperElement.height( self.element.outerHeight(true) );
self.oldVideoOpts = {};
@@ -411,14 +413,17 @@ $.widget("ui.video", {
},
_event_resize: function() {
- this.controls.position({
+ var self = this;
+ self.controls.position({
'my': 'bottom',
'at': 'bottom',
- 'of': this.element,
+ 'of': self.element,
'offset': '0 -10',
'collision': 'none'
}
);
+ self.wrapperElement.width( self.element.outerWidth(true) );
+ self.wrapperElement.height( self.element.outerHeight(true) );
},
// User functions

0 comments on commit 0125db9

Please sign in to comment.