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 linkScale = chroma.scale(chroma.interpolate.bezier(["green", "yellow", "red"])).domain([1, 5])
|
||||||
var sidebar
|
var sidebar
|
||||||
|
|
||||||
|
function dataTargetRemove(d) {
|
||||||
|
dataTargets = dataTargets.filter( function (e) { return d !== e })
|
||||||
|
}
|
||||||
|
|
||||||
function removeContent() {
|
function removeContent() {
|
||||||
if (!content)
|
if (!content)
|
||||||
return
|
return
|
||||||
|
|
||||||
router.removeTarget(content)
|
router.removeTarget(content)
|
||||||
|
dataTargetRemove(content)
|
||||||
content.destroy()
|
content.destroy()
|
||||||
contentDiv.removeChild(content.div)
|
contentDiv.removeChild(content.div)
|
||||||
content = null
|
content = null
|
||||||
|
|
Loading…
Reference in a new issue