Переглянути джерело

Show sidebar when selecting a node

Michael Schwarz 8 роки тому
батько
коміт
0618830cb3
2 змінених файлів з 3 додано та 0 видалено
  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) {
       return function () {
+        var sidebar = document.getElementById("sidebar")
+        sidebar.classList.remove("hidden")
         if (gotoNode(d))
           saveState({ node: d })
 

+ 1 - 0
lib/sidebar.js

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