Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc
Browse files Browse the repository at this point in the history
turner committed Jan 17, 2024
1 parent d216c51 commit 1a65cf1
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/browser.js
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ class Browser {
this.columnContainer = DOMUtils.div({class: 'igv-column-container'})
this.root.appendChild(this.columnContainer)

this.menuPopup = new MenuPopup(this.columnContainer)
this.menuPopup = new MenuPopup(this.columnContainer, { minX:0, minY:0 })

this.menuUtils = new MenuUtils(this)

2 changes: 1 addition & 1 deletion js/trackView.js
Original file line number Diff line number Diff line change
@@ -667,7 +667,7 @@ class TrackView {
this.gearContainer.appendChild(this.gear)
this.gear.appendChild(Icon.createIcon('cog'))

this.trackGearPopup = new MenuPopup(this.gear)
this.trackGearPopup = new MenuPopup(this.gear, undefined)

this.boundTrackGearClickHandler = trackGearClickHandler.bind(this)
this.gear.addEventListener('click', this.boundTrackGearClickHandler)
4 changes: 2 additions & 2 deletions js/ui/menuPopup.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import $ from "../vendor/jquery-3.3.1.slim.js"
import {getMultiSelectedTrackViews, isMultiSelectedTrackView} from "./menuUtils.js"

class MenuPopup {
constructor(parent) {
constructor(parent, constraint) {
this.popover = DOMUtils.div({class: 'igv-menu-popup'})

parent.appendChild(this.popover)
@@ -19,7 +19,7 @@ class MenuPopup {
this.popoverContent = DOMUtils.div()
this.popover.appendChild(this.popoverContent)

makeDraggable(this.popover, header)
makeDraggable(this.popover, header, constraint)

// absorb click to prevent it leaking through to parent DOM element
header.addEventListener('click', e => {

0 comments on commit 1a65cf1

Please sign in to comment.