src/js/widgets.js
branchpopcorn-port
changeset 826 c7ae4f126e51
parent 539 3ba5b82aebb6
child 830 18ca612e9ff0
equal deleted inserted replaced
825:04a1ff9e0449 826:c7ae4f126e51
    50   } 
    50   } 
    51 
    51 
    52   if (config.hasOwnProperty("layoutManager")) {
    52   if (config.hasOwnProperty("layoutManager")) {
    53      this.layoutManager = config.layoutManager;     
    53      this.layoutManager = config.layoutManager;     
    54   }
    54   }
       
    55   if (typeof this.selector != "undefined" && typeof Popcorn != "undefined") {
       
    56       var _id = this._id;
       
    57       this.selector.bind("click mouseover mouseout dragstart dragstop", function(_e) {
       
    58             var _data = {
       
    59                 "type": _e.type,
       
    60                 "x": _e.clientX,
       
    61                 "y": _e.clientY,
       
    62                 "widget": _id,
       
    63                 "target_name": _e.target.localName,
       
    64                 "target_id": _e.target.id,
       
    65                 "target_class": _e.target.className,
       
    66                 "text": _e.target.textContent.trim(),
       
    67                 "title": _e.target.title,
       
    68                 "value": _e.target.value
       
    69             };
       
    70             Popcorn.trigger('IriSP.Widget.MouseEvents', _data);
       
    71       })
       
    72   }
    55   
    73   
    56 };
    74 };
    57 
    75 
    58 /**
    76 /**
    59   * This method responsible of drawing a widget on screen.
    77   * This method responsible of drawing a widget on screen.