MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / getLayerLabel

Function getLayerLabel

app.js:4684–4698  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

4682}
4683
4684function getLayerLabel(el) {
4685 const t = String(el.type || "element");
4686 if (t === "text" || t === "label" || t === "button" || t === "header") {
4687 const v = (el.text || "").trim();
4688 return v ? `${t}: ${v}` : t;
4689 }
4690 if (t === "path") return "path";
4691 if (t === "triangle") return "triangle";
4692 if (t === "polygon") return `polygon ${el.sides || 6}`;
4693 if (t === "arc") return "arc";
4694 if (t === "gauge") return "gauge";
4695 if (t === "icon") return el.iconFile ? `icon: ${safeSymbolFromPath(el.iconFile)}` : "icon";
4696 if (t === "image") return el.imageName ? `image: ${el.imageName}` : "image";
4697 return t;
4698}
4699
4700function formatAssetMeta(a) {
4701 const bits = [];

Callers 1

renderLayersFunction · 0.85

Calls 1

safeSymbolFromPathFunction · 0.85

Tested by

no test coverage detected