dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
226 stars 68 forks source link

Add disableFeaturePopupDrag option #227

Closed davep closed 6 years ago

davep commented 6 years ago

Currently the featurePopup is designed so that it can be dragged around the page. From what I can see in the code, this is a deliberate design decision. Based on personal experience, I can see that there might be a need to have it so that it can't be dragged (one big reason in my experience is that some users might not want to be dragging the window, but they might want to select the title of the window to copy and paste it elsewhere: searching for a gene name in another tab or application, for example).

Given that there might be a reason why people would want to drag, and given that it should likely stay as the default design option, attached is a change that adds a new option to the browser: disableFeaturePopupDrag. If set to true dragging of the feature popup will be disabled; if set to false or omitted the default behaviour remains.

Apologies for the slight tidying of some trailing whitespace.

dasmoth commented 6 years ago

Thanks, good to have the option.

(As you may have gathered, there were originally a lot more pop-up UI elements -- most have been moved to the "sidebar" region now, but don't really have a great alternative to the feature popups).

davep commented 6 years ago

My pleasure, thanks for accepting.