Browse Source

Show sidebar when selecting a node

Michael Schwarz 8 years ago
parent
commit
0618830cb3
2 changed files with 3 additions and 0 deletions
  1. 2 0
      lib/router.js
  2. 1 0
      lib/sidebar.js

+ 2 - 0
lib/router.js

@@ -93,6 +93,8 @@ define(function () {
 
 
     self.node = function (d) {
     self.node = function (d) {
       return function () {
       return function () {
+        var sidebar = document.getElementById("sidebar")
+        sidebar.classList.remove("hidden")
         if (gotoNode(d))
         if (gotoNode(d))
           saveState({ node: d })
           saveState({ node: d })
 
 

+ 1 - 0
lib/sidebar.js

@@ -5,6 +5,7 @@ define([], function () {
     var sidebar = document.createElement("div")
     var sidebar = document.createElement("div")
     sidebar.classList.add("sidebar")
     sidebar.classList.add("sidebar")
     sidebar.classList.add("hidden")
     sidebar.classList.add("hidden")
+    sidebar.id = "sidebar"
     el.appendChild(sidebar)
     el.appendChild(sidebar)
 
 
     var button = document.createElement("button")
     var button = document.createElement("button")