Moving Labels around that are on top of a canvas

When my app loads, sometimes the labels are not where they should be.
So I want the end user to be able to move them to the correct position.

This code works for the Y coord. But the x coord works in the following manner.

When I press down on the canvas, the closer to the right hand side of the canvas the cursor is, the closer the label is placed to the cursor
The closer the cursor is to the left hand side of the canvas, when I press down on the canvas, the further away to the left, the label is placed from the cursor.

Just wondering what the ratio of distance is here.

Initial Code:

Improved Code:

Hello @peterjamesleniq
Is this working for you now as you expected?

1 Like

Yep thanks,
I think some nearby labels may have been getting in the way.

1 Like