Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
turner committed Aug 5, 2024
1 parent d9c506e commit e257765
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8,137 deletions.
7 changes: 4 additions & 3 deletions dev/interact/svg-ellipse.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

<script type="module">

import $ from '../../js/vendor/jquery-3.3.1.slim.js'
import igv from '../../js'
import igv from '../../js/index.js'

(async () => {

Expand Down Expand Up @@ -67,7 +66,9 @@

const browser = await igv.createBrowser(document.getElementById('igv-app-container'), config)

$('#igv-draw-svg-button').on('click', () => browser.saveSVGtoFile({ $container: $('#igv-svg-container') }))
document.getElementById('igv-draw-svg-button').addEventListener('click', function() {
browser.saveSVGtoFile({ container: document.getElementById('igv-svg-container') });
});


})()
Expand Down
12 changes: 5 additions & 7 deletions js/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,9 @@ class Browser {
// Append svg t testing, not used in production
if (container) {
const svg = document.createElement("svg");
svg.innerHTML = svgString
container.append(svg)
container.appendChild(svg)
svg.innerHTML = svgString; // Insert SVG content
container.appendChild(svg); // Append the SVG to the container
}

const path = filename || 'igvjs.svg'
const data = URL.createObjectURL(new Blob([svgString], {type: "application/octet-stream"}))
FileUtils.download(path, data)
Expand Down Expand Up @@ -2599,11 +2597,11 @@ function toggleTrackLabels(trackViews, isVisible) {

for (let {viewports} of trackViews) {
for (let viewport of viewports) {
if (viewport.trackLabel) {
if (viewport.trackLabelElement) {
if (0 === viewports.indexOf(viewport) && true === isVisible) {
viewport.trackLabel.style.display = 'block'
viewport.trackLabelElement.style.display = 'block'
} else {
viewport.trackLabel.style.display = 'none'
viewport.trackLabelElement.style.display = 'none'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion js/ui/cursorGuide.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class CursorGuide {

if (this.browser.getRulerTrackView()) {
for (let viewport of this.browser.getRulerTrackView().viewports) {
viewport.$tooltip.hide()
viewport.tooltip.style.display = 'none'
}
}

Expand Down
Loading

0 comments on commit e257765

Please sign in to comment.