I don't think there is a way to get coordinates but you can always set
them.

If you save the window size you can set the location of the plotting area.
You can then use this specific position for your relative mouse handling.

Here is one way to do it:
https://gist.github.com/pdamoc/bd56498b1e7fa8caf5ca39fafb17aff0




On Fri, May 20, 2016 at 1:01 AM, Fernando Alegre <[email protected]>
wrote:

>
> I am trying to write a plotting program that will have some user
> interaction. In particular, when the mouse enters a particular rectangle
> (let's call it the "plotting area") I need to show the (x,y) coordinates
> relative to the top left corner of that rectangle. Using "import Mouse" I
> get absolute coordinates for the whole window, but I don't know how to
> (easily) get the coordinates of the rectangle so that I can calculate the
> relative offset. Any hint will be appreciated.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to