src/js/widgets.js
branchpopcorn-port
changeset 124 2758dfb208b2
parent 122 04bd1e2f9674
child 170 5150ae56e0a6
--- a/src/js/widgets.js	Fri Oct 21 17:27:04 2011 +0200
+++ b/src/js/widgets.js	Mon Oct 24 12:42:15 2011 +0200
@@ -10,10 +10,22 @@
   this._config = config;  
   this._serializer = Serializer;
   
-  if (config.hasOwnProperty("gui") && config.gui.hasOwnProperty("container")) {
-     this._id = config.gui.container;
+  if (config.hasOwnProperty("container")) {
+     this._id = config.container;
      this.selector = IriSP.jQuery("#" + this._id);
-  }  
+  }
+
+  if (config.hasOwnProperty("width")) {
+     // this.width and not this._width because we consider it public.
+     this.width = config.width;     
+  }
+  
+  if (config.hasOwnProperty("height")) {
+     // this.width and not this._width because we consider it public.
+     this.height = config.height;     
+  }
+  
+  
 };
 
 IriSP.Widget.prototype.draw = function() {