- @idoc.body.onclick = (e) =>
- # idoc.body.offset().left/top
- new_cursor = find_loc_cursor_position @tree, x: e.pageX, y: e.pageY
+ @overlay.onclick = (e) =>
+ x = (e.offsetX ? e.layerX) - overlay_padding
+ y = (e.offsetY ? e.layerY) - overlay_padding
+ new_cursor = find_loc_cursor_position @tree, x: x, y: y