MCPcopy Create free account
hub / github.com/alienkitty/space.js / constructor

Method constructor

src/ui/Menu.js:9–27  ·  view source on GitHub ↗
({
        items,
        active,
        callback
    })

Source from the content-addressed store, hash-verified

7
8export class Menu extends Interface {
9 constructor({
10 items,
11 active,
12 callback
13 }) {
14 super('.menu');
15
16 this.names = items;
17 this.index = this.names.indexOf(active);
18 this.callback = callback;
19
20 this.active = -1;
21 this.items = [];
22
23 this.init();
24 this.initViews();
25
26 this.update();
27 }
28
29 init() {
30 this.css({

Callers

nothing calls this directly

Calls 3

initMethod · 0.95
initViewsMethod · 0.95
updateMethod · 0.95

Tested by

no test coverage detected