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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
Hello,
check out the example on the store https://store.codesys.com/visu-event-handler.html, especially the MouseHandler.project
Best regards,
Marcel
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?
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