src/js/layout.js
branchpopcorn-port
changeset 159 de92bfdcbe4c
parent 138 37b70a8c61a2
child 217 ec3e6d34462c
--- a/src/js/layout.js	Thu Oct 27 13:36:49 2011 +0200
+++ b/src/js/layout.js	Fri Oct 28 11:07:41 2011 +0200
@@ -11,7 +11,6 @@
     
     this._div = "LdtPlayer";
     this._width = 640;
-    this._height = 480;
     
     if (options === undefined) {
       options = {};
@@ -33,7 +32,9 @@
     this.selector = IriSP.jQuery("#" + this._div);
     
     this.selector.css("width", this._width);
-    this.selector.css("height", this._height);
+    
+    if (this._height !== undefined)
+      this.selector.css("height", this._height);
 };
 
 /* we need this special setter because of a chicken and egg problem :
@@ -49,7 +50,7 @@
 IriSP.LayoutManager.prototype.createDiv = function() {
     var newDiv = Popcorn.guid(this._div + "_widget_");
     this._widgets.push(newDiv);    
-    this.selector.append("<div id='" + newDiv + "'></div");
+    this.selector.append("<div id='" + newDiv + "' style='width: 100%'></div");
     
     return newDiv;
 };