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

Method constructor

src/ui/DetailsButton.js:11–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10export class DetailsButton extends Interface {
11 constructor() {
12 super('.button');
13
14 const size = 20;
15
16 this.width = size;
17 this.height = size;
18 this.x = size / 2;
19 this.y = size / 2;
20 this.radius = size * 0.4;
21 this.hoverRadius = size * 0.3;
22 this.openRadius = size * 0.2;
23 this.startAngle = 0;
24 this.endAngle = Math.PI * 2;
25 this.isOpen = false;
26 this.animatedIn = false;
27 this.hoveredIn = false;
28 this.needsUpdate = false;
29
30 this.props = {
31 radius: this.radius
32 };
33
34 this.init();
35 this.initCanvas();
36
37 this.addListeners();
38 }
39
40 init() {
41 this.css({

Callers

nothing calls this directly

Calls 3

initMethod · 0.95
initCanvasMethod · 0.95
addListenersMethod · 0.95

Tested by

no test coverage detected