rename gotoAnything to router
This commit is contained in:
parent
a2669373a0
commit
265cb2e5eb
7 changed files with 39 additions and 39 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue