src/js/widgets.js
branchpopcorn-port
changeset 124 2758dfb208b2
parent 122 04bd1e2f9674
child 170 5150ae56e0a6
equal deleted inserted replaced
123:58bb8ccea9a8 124:2758dfb208b2
     8   
     8   
     9   this._Popcorn = Popcorn;
     9   this._Popcorn = Popcorn;
    10   this._config = config;  
    10   this._config = config;  
    11   this._serializer = Serializer;
    11   this._serializer = Serializer;
    12   
    12   
    13   if (config.hasOwnProperty("gui") && config.gui.hasOwnProperty("container")) {
    13   if (config.hasOwnProperty("container")) {
    14      this._id = config.gui.container;
    14      this._id = config.container;
    15      this.selector = IriSP.jQuery("#" + this._id);
    15      this.selector = IriSP.jQuery("#" + this._id);
    16   }  
    16   }
       
    17 
       
    18   if (config.hasOwnProperty("width")) {
       
    19      // this.width and not this._width because we consider it public.
       
    20      this.width = config.width;     
       
    21   }
       
    22   
       
    23   if (config.hasOwnProperty("height")) {
       
    24      // this.width and not this._width because we consider it public.
       
    25      this.height = config.height;     
       
    26   }
       
    27   
       
    28   
    17 };
    29 };
    18 
    30 
    19 IriSP.Widget.prototype.draw = function() {
    31 IriSP.Widget.prototype.draw = function() {
    20   /* implemented by "sub-classes" */  
    32   /* implemented by "sub-classes" */  
    21 };
    33 };