Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Cursor coordinates for web-visu client

e.kislov
2019-09-17
2019-09-17
  • e.kislov - 2019-09-17

    Hi.
    I need to get cursor coordinates for specific web-visu client in variables.
    I have client context (POINTER TO VisuElems.VisuStructClientData), can I extract cursor info from this struct?

     
  • e.kislov - 2019-09-17

    Hi, m.prestel.
    In this example cursor "global" for all web-clients.
    In my case I have independent clients with independent cursors.
    Can you give a tip how I need to edit example in my case?

     
  • m.prestel - 2019-09-17

    Hello,

    HandleMouseMoveEvent will be called with the client where the move occurred.
    IF you use CURRENTCLIENTID in your visualization, you can use pClient^.GlobalData.GlobalClientID to store the values in a array (otherwise GlobalClientID will always be -1).

    For the size of the array you can use VISU_MIN_NUMBER_OF_CLIENTS & VISU_MAX_NUMBER_OF_CLIENTS
    e.g.
    ARRAY [VISU_MIN_NUMBER_OF_CLIENTS..VISU_MAX_NUMBER_OF_CLIENTS] OF VisuStructPoint;

    Best regards,
    Marcel

     

Log in to post a comment.