MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / addThumbnailMenuButton

Function addThumbnailMenuButton

renderer.js:16096–16127  ·  view source on GitHub ↗
(thumbnailContainer, filePath)

Source from the content-addressed store, hash-verified

16094
16095 // Create menu container
16096 const menu = document.createElement('div');
16097 menu.id = 'html-context-menu';
16098 menu.style.cssText = `
16099 position: fixed;
16100 left: ${x}px;
16101 top: ${y}px;
16102 background-color: #2d2d2d;
16103 border: 1px solid #555;
16104 border-radius: 4px;
16105 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
16106 z-index: 10000;
16107 min-width: 200px;
16108 padding: ${showClose ? '20px 0 4px 0' : '4px 0'};
16109 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
16110 font-size: 13px;
16111 `;
16112
16113 if (showClose) {
16114 const closeButton = document.createElement('button');
16115 closeButton.type = 'button';
16116 closeButton.textContent = 'x';
16117 closeButton.style.cssText = `
16118 position: absolute;
16119 top: 4px;
16120 right: 6px;
16121 background: transparent;
16122 border: none;
16123 color: #ccc;
16124 font-size: 14px;
16125 cursor: pointer;
16126 padding: 0;
16127 `;
16128 closeButton.addEventListener('click', (e) => {
16129 e.stopPropagation();
16130 menu.remove();

Callers 2

createModelItemFunction · 0.85

Calls 1

showHtmlContextMenuFunction · 0.85

Tested by

no test coverage detected