code: function(e) {
        var p = this._getMouseEvtPos(e);
  		var lx = p[0], ly = p[1], n = this.wires.length, w;
  		for(var i = 0 ; i < n ; i++) {
  			w = this.wires[i];
  			var elx = w.element.offsetLeft, ely = w.element.offsetTop;
  			// Check if the mouse is within the canvas boundaries
  			if( lx >= elx && lx < elx+w.element.width && ly >= ely && ly < ely+w.element.height ) {
  				var rx = lx-elx, ry = ly-ely; // relative to the canvas
  				w.onClick(rx,ry);
  			}
  		}
  	}
docs: Handles click on any wire canvas
  Note: we treat mouse events globally so that wires behind others can still receive the events
  @method onWireClick
  @param {Event} e Mouse click event