rename gotoAnything to router

This commit is contained in:
Nils Schneider 2015-03-25 19:45:21 +01:00
commit 265cb2e5eb
7 changed files with 39 additions and 39 deletions

View file

@ -1,5 +1,5 @@
define(["infobox/link", "infobox/node"], function (Link, Node) {
return function (config, sidebar, gotoAnything) {
return function (config, sidebar, router) {
var self = this
el = undefined
@ -22,7 +22,7 @@ define(["infobox/link", "infobox/node"], function (Link, Node) {
var closeButton = document.createElement("button")
closeButton.classList.add("close")
closeButton.onclick = gotoAnything.reset
closeButton.onclick = router.reset
el.appendChild(closeButton)
}
@ -30,12 +30,12 @@ define(["infobox/link", "infobox/node"], function (Link, Node) {
self.gotoNode = function (d) {
create()
new Node(config, el, gotoAnything, d)
new Node(config, el, router, d)
}
self.gotoLink = function (d) {
create()
new Link(config, el, gotoAnything, d)
new Link(config, el, router, d)
}
return self