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

Method initCanvas

src/ui/MuteButton.js:50–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 }
49
50 initCanvas() {
51 this.canvas = new Interface(null, 'canvas');
52 this.canvas.css({
53 position: 'absolute',
54 left: '50%',
55 top: '50%',
56 marginLeft: -this.width / 2,
57 marginTop: -this.height / 2
58 });
59 this.context = this.canvas.element.getContext('2d');
60 this.add(this.canvas);
61 }
62
63 addListeners() {
64 this.element.addEventListener('mouseenter', this.onHover);

Callers 1

constructorMethod · 0.95

Calls 2

cssMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected