rem: this.scrollItemIntoView(this.getNext(oItem) || oItem); 
context: proto._onmouseevent = function(oItem, e, bOver){  if (!oItem.getEnabled()) {    return;  };      // ********************************************************************  //   Init  // ********************************************************************  // Cache current (old) values  var oldVal = this._getChangeValue();  var oldLead = this.getLeadItem();  // Temporary disabling of event fire  var oldFireChange = this.getFireChange();  this.setFireChange(false);  // Cache selection and count  var selectedItems = this.getSelectedItems();  var selectedCount = selectedItems.length;  // Update lead item  this.setLeadItem(oItem);  // Cache current anchor item  var currentAnchorItem = this.getAnchorItem();  // Cache keys pressed  var vCtrlKey = e.getCtrlKey();  var vShiftKey = e.getShiftKey();  // ********************************************************************  //   Do we need to update the anchor?  // ********************************************************************    if (!currentAnchorItem || selectedCount == 0 || (vCtrlKey && !vShiftKey && this.getMultiSelection() && !this.getDragSelection()))  {    this.setAnchorItem(oItem);    currentAnchorItem = oItem;  };  // ********************************************************************  //   Mode #1: Replace current selection with new one  // ********************************************************************  if ((!vCtrlKey && !vShiftKey && !this._activeDragSession || !this.getMultiSelection()))  {    if (!oItem.getEnabled()) {      return;    };        // Remove current selection    this._deselectAll();        // Update anchor item    this.setAnchorItem(oItem);    if (!this.getItemSelected(oItem)) {      this.renderItemSelectionState(oItem, true);    };    // Clear up and add new one    //this._selectedItems.removeAll();    this._selectedItems.add(oItem);        this._addToCurrentSelection = true;  }    // ********************************************************************  //   Mode #2: (De-)Select item range in mouse drag session  // ********************************************************************  else if (this._activeDragSession && bOver)  {    if (oldLead) {      this._deselectItemRange(currentAnchorItem, oldLead);    };        // Drag down    if (this.isBefore(currentAnchorItem, oItem))    {      if (this._addToCurrentSelection)      {        this.scrollItemIntoView(this.getNext(oItem) || oItem);        this._selectItemRange(currentAnchorItem, oItem, false);      }      else      {        this.scrollItemIntoView(this.getPrevious(oItem) || oItem);        this._deselectItemRange(currentAnchorItem, oItem);      };          }        // Drag up    else    {      if (this._addToCurrentSelection)      {        this.scrollItemIntoView(this.getPrevious(oItem) || oItem);        this._selectItemRange(oItem, currentAnchorItem, false);      }      else      {        this.scrollItemIntoView(this.getNext(oItem) || oItem);        this._deselectItemRange(oItem, currentAnchorItem);      };          };  }      // ********************************************************************  //   Mode #3: Add new item to current selection (ctrl pressed)  // ********************************************************************  else if (this.getMultiSelection() && vCtrlKey && !vShiftKey)  {    if (!this._activeDragSession) {      this._addToCurrentSelection = !(this.getCanDeselect() && this.getItemSelected(oItem));    };        this.setItemSelected(oItem, this._addToCurrentSelection);    this.setAnchorItem(oItem);  }  // ********************************************************************  //   Mode #4: Add new (or continued) range to selection  // ********************************************************************  else if (this.getMultiSelection() && vCtrlKey && vShiftKey)  {    if (!this._activeDragSession) {      this._addToCurrentSelection = !(this.getCanDeselect() && this.getItemSelected(oItem));    };    if (this._addToCurrentSelection)     {      this._selectItemRange(currentAnchorItem, oItem, false);    }    else    {       this._deselectItemRange(currentAnchorItem, oItem);    };  }  // ********************************************************************  //   Mode #5: Replace selection with new range selection  // ********************************************************************  else if (this.getMultiSelection() && !vCtrlKey && vShiftKey)  {    if (this.getCanDeselect())    {      this._selectItemRange(currentAnchorItem, oItem, true);    }    else    {      if (oldLead) {        this._deselectItemRange(currentAnchorItem, oldLead);      };      this._selectItemRange(currentAnchorItem, oItem, false);    };  };  // Recover change event status  this.setFireChange(oldFireChange);  // Dispatch change Event    if(oldFireChange && this._hasChanged(oldVal)) {    this._dispatchChange();  };};
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/d0984a49e5708d61cfe1e6165e1e198760df5324/QxSelectionManager.js/buggy/qooxdoo/source/script/managers/QxSelectionManager.js