Arbor.js – Open node links in new browser window

While testing arbor.js to realize a linkable visual websites map, i realized that was quite hard to find a way to open links in a new browser’s tab or window when clicking on linkable nodes.

Arbor.is a powerful visualization library using web workers and jQuery, realized by Christian Swinehart.

If You’re lucky, there’s only one line of code to replace.
In my project it’s located in the site.js folder (same level of the index.html file), but due to the complexity and wide variety of options offered by the library, in Your project it may be located elsewhere.

Anyway, just test this solution:

Look for the following line of code:

window.location = link

And replace it with the line below:

window.open(link, "_blank")

Be sure to don’t delete the closing curly bracket } just after the line.

To be clear…
Before:

window.location = link
}

return false
}

After:

window.open(link, "_blank")
}

return false
}

Hope it helped!