MCPcopy
hub / github.com/Comfy-Org/ComfyUI-Manager / showTooltip

Function showTooltip

comfyui_manager/js/common.js:606–631  ·  view source on GitHub ↗
(target, text, className = 'cn-tooltip', styleMap = {})

Source from the content-addressed store, hash-verified

604 }
605}
606export function showTooltip(target, text, className = 'cn-tooltip', styleMap = {}) {
607 if (!$tooltip) {
608 $tooltip = document.createElement("div");
609 $tooltip.className = className;
610 $tooltip.style.cssText = `
611 pointer-events: none;
612 position: fixed;
613 z-index: 10001;
614 padding: 20px;
615 color: #1e1e1e;
616 max-width: 350px;
617 filter: drop-shadow(1px 5px 5px rgb(0 0 0 / 30%));
618 ${Object.keys(styleMap).map(k=>k+":"+styleMap[k]+";").join("")}
619 `;
620 document.body.appendChild($tooltip);
621 }
622
623 $tooltip.innerHTML = text;
624 $tooltip.style.display = "block";
625 renderPopover($tooltip, target, {
626 positions: ['top', 'bottom', 'right', 'center'],
627 bgColor: "#ffffff",
628 borderColor: "#cccccc",
629 borderRadius: 5
630 });
631}
632
633export function generateUUID() {
634 return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {

Callers 1

mouseenterHandlerFunction · 0.85

Calls 2

renderPopoverFunction · 0.85
keysMethod · 0.45

Tested by

no test coverage detected