bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(mouseEvent) {//Sub classes can override this to position the drop down differently.
			this._dropdownNode.style.left = "";
			this._dropdownNode.style.top = "";
			
			if(this._positioningNode) {
				this._dropdownNode.style.left = this._positioningNode.offsetLeft + "px";
				return;
			}
			
			var bounds = lib.bounds(this._dropdownNode);
			var bodyBounds = lib.bounds(document.body);
			if (bounds.left + bounds.width > (bodyBounds.left + bodyBounds.width)) {
				if (this._triggerNode.classList.contains("dropdownMenuItem")) { //$NON-NLS-0$
					this._dropdownNode.style.left = -bounds.width + "px"; //$NON-NLS-0$
				} else {
					var totalBounds = lib.bounds(this._boundingNode(this._triggerNode));
					var triggerBounds = lib.bounds(this._triggerNode);
					this._dropdownNode.style.left = (triggerBounds.left - totalBounds.left - bounds.width + triggerBounds.width) + "px"; //$NON-NLS-0$
				}
			}
			
			//ensure menu fits on page vertically
			var overflowY = (bounds.top + bounds.height) - (bodyBounds.top + bodyBounds.height);
			if (0 < overflowY) {
				this._dropdownNode.style.top = Math.floor(this._dropdownNode.style.top - overflowY) + "px"; //$NON-NLS-0$
			}
		}
function(mouseEvent) {//Sub classes can override this to position the drop down differently.
			this._dropdownNode.style.left = "";
			this._dropdownNode.style.top = "";
			
			if(this._positioningNode) {
				this._dropdownNode.style.left = this._positioningNode.offsetLeft + "px";
				return;
			}
			
			var bounds = lib.bounds(this._dropdownNode);
			var bodyBounds = lib.bounds(document.body);
			if (bounds.left + bounds.width > (bodyBounds.left + bodyBounds.width)) {
				if (this._triggerNode.classList.contains("dropdownMenuItem")) { //$NON-NLS-0$
					this._dropdownNode.style.left = -bounds.width + "px"; //$NON-NLS-0$
				} else {
					var totalBounds = lib.bounds(this._boundingNode(this._triggerNode));
					var triggerBounds = lib.bounds(this._triggerNode);
					this._dropdownNode.style.left = (triggerBounds.left - totalBounds.left - bounds.width + triggerBounds.width) + "px"; //$NON-NLS-0$
				}
			}
			
			//ensure menu fits on page vertically
			var overflowY = (bounds.top + bounds.height) - (bodyBounds.top + bodyBounds.height);
			if (0 < overflowY) {
				this._dropdownNode.style.top = Math.floor(this._dropdownNode.style.top - overflowY) + "px"; //$NON-NLS-0$
			}
		}
function ( mouseEvent ) { //Sub classes can override this to position the drop down differently. this . _dropdownNode . style . left = "" ; this . _dropdownNode . style . top = "" ; if ( this . _positioningNode ) { this . _dropdownNode . style . left = this . _positioningNode . offsetLeft + "px" ; return ; } var bounds = lib . bounds ( this . _dropdownNode ) ; var bodyBounds = lib . bounds ( document . body ) ; if ( bounds . left + bounds . width > ( bodyBounds . left + bodyBounds . width ) ) { if ( this . _triggerNode . classList . contains ( "dropdownMenuItem" ) ) { //$NON-NLS-0$ this . _dropdownNode . style . left = - bounds . width + "px" ; //$NON-NLS-0$ } else { var totalBounds = lib . bounds ( this . _boundingNode ( this . _triggerNode ) ) ; var triggerBounds = lib . bounds ( this . _triggerNode ) ; this . _dropdownNode . style . left = ( triggerBounds . left - totalBounds . left - bounds . width + triggerBounds . width ) + "px" ; //$NON-NLS-0$ } } //ensure menu fits on page vertically var overflowY = ( bounds . top + bounds . height ) - ( bodyBounds . top + bodyBounds . height ) ; if ( 0 < overflowY ) { this . _dropdownNode . style . top = Math . floor ( this . _dropdownNode . style . top - overflowY ) + "px" ; //$NON-NLS-0$ } }
This method positions the dropdown menu.
The specified mouseEvent is ignored. However, subclasses
can override this method if they wish to take the mouse
position contained in the mouse event into account.

@param {MouseEvent} mouseEvent
This method positions the dropdown menu . The specified mouseEvent is ignored . However subclasses can override this method if they wish to take the mouse position contained in the mouse event into account .