File size: 1,202 Bytes
89c369e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1daa44a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// application/static/js/components/navbar.js
class Navbar {
    constructor(UIManager) {
      console.log("Navbar constructor called"); // Keep this
    //   this.uiManager = UIManager;
    //   this.menu = this.uiManager.menu;
    //   this.hamburger = this.uiManager.hamburger;
    //   this.container = this.uiManager.container;
    //   this.state = true; // true = open, false = closed
    //   this.menuWidth = 0;
    //   this.containerWidth = this.container.clientWidth;
    //   this.NAV_AREA_LARGE = 20; // % of window width
    //   this.NAV_AREA_MEDIUM = 25; // % of window width
    //   this.NAV_AREA_SMALL = 60; // % of window width
    //   this.ANIMATION_STEP = 5; // pixels per frame
    }

    run() {
      console.log("Navbar run called"); //Keep this
    //   this.navArea = this.calculateNavArea();
    //   this.nav = {
    //       open: () => this.animateNav('open'),
    //       close: () => this.animateNav('close'),
    //   };

    //   if (window.innerWidth <= 785) {
    //       this.state = false;
    //   } else {
    //       this.nav.open();
    //   }

    //   this.hamburger.addEventListener('click', () => this.toggleState());
    }
}

export default Navbar