Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
turner committed Jan 17, 2024
1 parent 89585f7 commit b809a24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/trackView.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ class TrackView {
this.gearContainer.appendChild(this.gear)
this.gear.appendChild(Icon.createIcon('cog'))

const constraint = (top, dy) => {
const constraint = (menuTop, dragIncrement) => {
const delta = this.gearContainer.getBoundingClientRect().top - browser.columnContainer.getBoundingClientRect().top
return Math.max(-delta, top+dy)
return Math.max(-delta, menuTop + dragIncrement)
}

this.trackGearPopup = new MenuPopup(this.gear, constraint)
Expand Down

0 comments on commit b809a24

Please sign in to comment.