removeContent: also remove from dataTargets
This commit is contained in:
parent
c4383aabb9
commit
0a0b8bd065
|
@ -13,11 +13,16 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Linklist,
|
|||
var linkScale = chroma.scale(chroma.interpolate.bezier(["green", "yellow", "red"])).domain([1, 5])
|
||||
var sidebar
|
||||
|
||||
function dataTargetRemove(d) {
|
||||
dataTargets = dataTargets.filter( function (e) { return d !== e })
|
||||
}
|
||||
|
||||
function removeContent() {
|
||||
if (!content)
|
||||
return
|
||||
|
||||
router.removeTarget(content)
|
||||
dataTargetRemove(content)
|
||||
content.destroy()
|
||||
contentDiv.removeChild(content.div)
|
||||
content = null
|
||||
|
|
Loading…
Reference in a new issue