MCPcopy Create free account
hub / github.com/NikLever/ThreeJS-PathEditor / addLinks

Method addLinks

menu.js:26–41  ·  view source on GitHub ↗
( links = [] )

Source from the content-addressed store, hash-verified

24 }
25
26 addLinks( links = [] ){
27 let html = "";
28
29 /*<div class="flex hover:bg-gray-100 py-1 px-2 rounded cursor-pointer">
30 <button class="ml-4" onclick="alert('Delete');">Delete</button>
31 </div>*/
32
33 const prefix = '<div class="flex hover:bg-gray-100 py-1 px-2 rounded cursor-pointer"><button class="ml-4" onclick="';
34
35 links.forEach( link => {
36 html = `${html + prefix}window.app.${link.code};">${link.name}</button></div>`;
37 });
38
39 const elm = document.getElementById("menu-links");
40 elm.innerHTML = html;
41 }
42
43 show(e) {
44 if (this.menuState !== 1) {

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected