Skip to content

Commit

Permalink
Navbar refactor (#1905)
Browse files Browse the repository at this point in the history
Refactor navbar code - introduce class for navbar.
Fix problem with overlay(merged) tracks when group autoscaled
  • Loading branch information
jrobinso authored Oct 24, 2024
1 parent 5296843 commit e3fdbb4
Show file tree
Hide file tree
Showing 21 changed files with 494 additions and 392 deletions.
10 changes: 6 additions & 4 deletions dev/shoebox/shoebox.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ <h1>Shoebox</h1>
locus: "chr1:1,001,575-1,002,408",
tracks: [
{
"url": "https://www.dropbox.com/scl/fi/2tv6vnqqlfy6kxzahshwc/pseudobulk_14.bed?rlkey=ytrotr3v197k26pe2dettfgsr&dl=0",
// "name": "pseudobulk 14",
// "type": "shoebox",
// "format": "shoebox"
"url": "https://www.dropbox.com/scl/fi/ayu63q7raqi47yduvvte5/pseudobulk_0.bed.gz?rlkey=ci5oqo928iljje4igk4wwjoor&dl=0",
"indexURL": "https://www.dropbox.com/scl/fi/bxz53av4v0ri9snidxj8g/pseudobulk_0.bed.gz.tbi?rlkey=qvc7zk8si0ays89cqjp05fdw9&dl=0",
// visibilityWindow: 10000
// "name": "pseudobulk 14",
// "type": "shoebox",
// "format": "shoebox"
},
{
"name": "Homo sapiens HepG2 H3K4me3 ",
Expand Down
8 changes: 7 additions & 1 deletion dev/wig/groupAutoscale.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h1>Test tracks</h1>
import igv from "../../js/index.js";

const options = {
queryParametersSupported: true,
"genome": "hg19",
"locus": "myc egfr",
"tracks": [
Expand Down Expand Up @@ -94,7 +95,12 @@ <h1>Test tracks</h1>
})

document.getElementById("bookmarkButton").addEventListener("click",
() => window.history.pushState({}, "IGV", browser.sessionURL()))
() => {
const path = window.location.href.slice()
const idx = path.indexOf("?")
const url = (idx > 0 ? path.substring(0, idx) : path) + "?sessionURL=blob:" + browser.compressedSession()
window.history.pushState({}, "IGV", url)
})

document.getElementById("svgButton").addEventListener("click", () => {
let svg = browser.toSVG();
Expand Down
5 changes: 3 additions & 2 deletions js/bigwig/bwReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ class BWReader {
this.loader = isDataURL(this.path) ?
new DataBuffer(this.path) : igvxhr

if (config.searchTrix) {
this._trix = new Trix(`${config.searchTrix}x`, config.searchTrix)
const trixURL = config.trixURL || config.searchTrix
if (trixURL) {
this._trix = new Trix(`${trixURL}x`, trixURL)
}

}
Expand Down
Loading

0 comments on commit e3fdbb4

Please sign in to comment.