Use boundingrectangle to calculate mouse position relative to dom element