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