igvteam / juicebox.js

HiC contact matrix visualization
MIT License
19 stars 13 forks source link

Scroll bar widgets #8

Closed jrobinso closed 7 years ago

jrobinso commented 7 years ago

Implement the "scrollbar" widgets as in Juicebox Desktop (see screenshot). We might be able to crib scrollbar code from igv.js to do this.

jrobinso commented 7 years ago

These are sort of like scrollbars, but reflect the region in view wrt the total chromosome length. Exactly like the red box on the ideogram in igv.js. The math can be worked out from multiple directions, but here's how I see it

Chromsome length (in bins) = (chrLength in bp) / (bin size)

Number of bins in view = (view dimension in pixels) / (pixelSize)

Start location in bins = state.x or state.y