Explorar o código

Start with hidden sidebar

Michael Schwarz %!s(int64=8) %!d(string=hai) anos
pai
achega
6631a99014
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  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")