MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 73: Line 73:
var top = parseInt(window.getComputedStyle(e.target).top);
var top = parseInt(window.getComputedStyle(e.target).top);


                 console.log('bodyLeft', left - bodyLeft);
                 // console.log('bodyLeft', left - bodyLeft);
                 console.log('bodyTop', top );
                 // console.log('bodyTop', top );
                 e.target.style.left = left - bodyLeft + 'px';
                 // e.target.style.left = left - bodyLeft + 'px';
    // 마우스의 현재 위치 가져오기
    const mouseX = event.clientX;
    const mouseY = event.clientY;
 
    // 툴팁 위치 설정
    tooltip.style.left = mouseX + 'px';
    tooltip.style.top = mouseY + 'px';               
             });
             });
         }
         }