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

Function renderPopover

comfyui_manager/js/common.js:550–575  ·  view source on GitHub ↗
($elem, target, options = {})

Source from the content-addressed store, hash-verified

548};
549
550function renderPopover($elem, target, options = {}) {
551 // async microtask
552 queueMicrotask(() => {
553
554 const containerRect = getRect(window);
555 const targetRect = getRect(target);
556 const elemRect = getRect($elem);
557
558 const positionInfo = getBestPosition(
559 containerRect,
560 targetRect,
561 elemRect,
562 options.positions
563 );
564 const style = getPositionStyle(positionInfo, {
565 bgColor: options.bgColor,
566 borderColor: options.borderColor,
567 borderRadius: options.borderRadius
568 });
569
570 $elem.style.top = positionInfo.top + "px";
571 $elem.style.left = positionInfo.left + "px";
572 $elem.style.background = style.background;
573
574 });
575}
576
577let $popover;
578export function hidePopover() {

Callers 2

showPopoverFunction · 0.85
showTooltipFunction · 0.85

Calls 3

getRectFunction · 0.90
getBestPositionFunction · 0.90
getPositionStyleFunction · 0.90

Tested by

no test coverage detected