Opera, event.layerX / event.layerY properties and mouseDropped event
That is, when mouse drag is ended, i try to catch the point on the Raphael’s
Paper object (
SVG element, actually) where the mouse caused
FireFox and Chrome are doing well with
event.layerY properties. But Opera does not have those.
pageY properties (may be mistaken in the last two’ names) however. But i can’t create any algorithm to calculate the final mouse position.
See, the mouse starts “dragging” pin of an circuit symbol (without actual dragging its image) and ends dropping on another one:
So, Opera shows coordinates like (5, 7) when mouse causes drop event. I assume these are the coordinates around the second pin. But i do not need those – using them i can not find the pin user tries connect to.
So, the questionis: do you know any way to find the mouse cursor coordinates when the drop event is called, relatively to the parent element it is dropping (e.g. Raphael’s
Paper object and / or its container in the case described).
One Solution collect form web for “Opera, event.layerX / event.layerY properties and mouseDropped event”
Can you keep updating variables with the location of the cursor during mouse move when the mouse button is down and use the last values set when the drop is fired?