Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
joewdavies committed Sep 16, 2024
1 parent 480b815 commit a8ffe3f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
16 changes: 12 additions & 4 deletions build/dorling.js

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions src/dorling.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,13 @@ export function dorling() {
function addStandaloneToDOM() {
let container = document.createElement('div')
container.classList.add('standalone-nav')
out.containerNode_.node().appendChild(container)
let parent = document.getElementById('dorling-header')
if (parent) {
parent.appendChild(container)
} else {
out.containerNode_.node().appendChild(container)
}

let text
if (out.standalone_.infoText) {
text = out.standalone_.infoText
Expand Down Expand Up @@ -480,8 +486,10 @@ export function dorling() {
//add legends
addSizeLegend()
addColorLegend()
// NUTS selector is drawn inside legend container, so we need to reappend it after clearing the legend container
addNutsSelectorToDOM()
// NUTS selector is drawn inside legend container in simple mode, so we need to reappend it after clearing the legend container
if (!out.standalone_) {
addNutsSelectorToDOM()
}

// show legends & nuts selector
out.legendContainer.transition().duration(750).attr('opacity', 0.9)
Expand Down

0 comments on commit a8ffe3f

Please sign in to comment.