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

Method init

src/ui/TargetNumber.js:19–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 }
18
19 init() {
20 this.invisible();
21 this.css({
22 position: 'relative',
23 boxSizing: 'border-box',
24 width: this.width,
25 height: this.height,
26 border: `${window.devicePixelRatio > 1 ? 1.5 : 1}px solid var(--ui-color)`
27 });
28
29 this.number = new Interface('.number');
30 this.number.css({
31 position: 'absolute',
32 left: window.devicePixelRatio > 1 ? 4 : 5,
33 fontVariantNumeric: 'tabular-nums',
34 lineHeight: this.height - (window.devicePixelRatio > 1 ? 3 : 2),
35 letterSpacing: 'var(--ui-number-letter-spacing)',
36 textAlign: 'center'
37 });
38 this.add(this.number);
39 }
40
41 // Public methods
42

Callers 1

constructorMethod · 0.95

Calls 3

invisibleMethod · 0.80
cssMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected