Browse Source

Start with hidden sidebar

Michael Schwarz 8 years ago
parent
commit
6631a99014
2 changed files with 4 additions and 0 deletions
  1. 2 0
      lib/router.js
  2. 2 0
      lib/sidebar.js

+ 2 - 0
lib/router.js

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

+ 2 - 0
lib/sidebar.js

@@ -4,6 +4,8 @@ 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")