MCPcopy Create free account
hub / github.com/JKPotato-Computer/SignMaker / constructor

Method constructor

js/SubPanels.js:3–25  ·  view source on GitHub ↗
({
        controlText = "New Sign",
        actionMessage = "",
        shields = [],
        width = 1,
        height = "2",
		shieldDistance = 0.8
        } = {}
    )

Source from the content-addressed store, hash-verified

1class SubPanels {
2
3 constructor({
4 controlText = "New Sign",
5 actionMessage = "",
6 shields = [],
7 width = 1,
8 height = "2",
9 shieldDistance = 0.8
10 } = {}
11 ) {
12 this.controlText = controlText;
13 this.actionMessage = actionMessage;
14
15
16 this.shields = shields;
17 if ((parseInt(width) < 1) || (parseInt(width) == undefined)) {
18 this.width = 1;
19 } else {
20 this.width = parseInt(width);
21 }
22
23 this.height = height;
24 this.shieldDistance = shieldDistance
25 }
26
27
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected