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

Class ExitTab

js/ExitTab.js:1–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class ExitTab {
2 /**
3 * Creates a new ExitTab.
4 * @param {string} number - Number to display on the exit tab.
5 * @param {string} [position=null] - Position to display the exit tab relative to the sign.
6 * @param {string} [width=null] - Width of the exit tab (narrow or wide).
7 */
8 constructor ({
9 number = null,
10 position = null,
11 width = null,
12 color = null,
13 variant = "Default",
14 icon = null,
15 useTextBasedIcon = false,
16 fullBorder = false,
17 topOffset = true,
18 showLeft = false,
19 borderThickness = 0.2,
20 minHeight = 2.25,
21 nestedExitTabs = [],
22 FHWAFont = false,
23 fontSize = 18
24 } = {}
25 ) {
26 this.number = number;
27 if (this.positions.includes(position)) {
28 this.position = position;
29 } else {
30 this.position = this.positions[1];
31 }
32 if (this.widths.includes(width)) {
33 this.width = width;
34 } else {
35 this.width = this.widths[0];
36 }
37 if (this.colors.includes(color)) {
38 this.color = color;
39 } else {
40 this.color = this.colors[0];
41 }
42
43 if (this.variants.includes(variant)) {
44 this.variant = variant;
45 } else {
46 this.variant = this.variants[0];
47 }
48
49 this.fullBorder = fullBorder;
50 this.borderThickness = borderThickness;
51 this.topOffset = topOffset;
52 this.minHeight = minHeight;
53 this.nestedExitTabs = nestedExitTabs;
54 this.FHWAFont = FHWAFont;
55 this.icon = icon;
56 this.showLeft = showLeft;
57 this.fontSize = fontSize;
58 }
59
60 nestExitTab() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected