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

Function createArrowElmt

js/main.js:1922–1950  ·  view source on GitHub ↗
(key, dir, name, extra)

Source from the content-addressed store, hash-verified

1920
1921
1922 const createArrowElmt = function(key, dir, name, extra) {
1923
1924 if (dir == "MainArrows!ExitOnly") {
1925 key = key.split("/")[1];
1926 } else {
1927 key = key.split("/")[0];
1928 }
1929
1930
1931 if ((ExitKeys.includes(key.split("-")[0])) || (MainKeys.includes(key.split("-")[0]))) {
1932 const downArrowElmt = document.createElement("img");
1933 downArrowElmt.className = name || "exitOnlyArrow ";
1934
1935 if (extra) {
1936 downArrowElmt.className += " " + extra;
1937 }
1938
1939 var directory = "ExitOnlyArrows";
1940
1941 if (dir == "MainArrows!ExitOnly") {
1942 directory = "MainArrows";
1943 } else if (dir) {
1944 directory = dir;
1945 }
1946
1947 downArrowElmt.src = "img/arrows/" + directory + "/" + key + ".png";
1948 return downArrowElmt;
1949 }
1950 }
1951
1952 if ((panel.sign.arrowPosition == "Left") && (panel.sign.guideArrow != "Exit Only") && (panel.sign.guideArrow != "Side Left") && (panel.sign.guideArrow != "Side Right") && (panel.sign.guideArrow != "Half Exit Only")) {
1953 arrowContElmt.style.justifyContent = "left";

Callers 1

redrawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected