MCPcopy Index your code
hub / github.com/methodofaction/Method-Draw / canPutTextOnPath

Function canPutTextOnPath

src/js/Panel.js:141–146  ·  view source on GitHub ↗
(elems)

Source from the content-addressed store, hash-verified

139 }
140
141 function canPutTextOnPath(elems) {
142 if (elems.length !== 2) return false;
143 const text = elems.find(elem => elem.tagName === "text");
144 const path = elems.find(elem => ["ellipse", "circle", "line", "polyline", "polygon", "rect", "path"].indexOf(elem.tagName) > -1);
145 return (!!text && !!path);
146 }
147
148 function updateContextPanel(elems) {
149 if (!elems) elems = editor.selected;

Callers 1

updateContextPanelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected