Answer the question
In order to leave comments, you need to log in
Hover event on diamond in canvas?
There is a rhombus on the canvas for which you need to work out the hover event. How to do it? couldn't google anything.
now I'm looking for the hover area through the condition with the coordinates of the mouse and the rhombus itself:
if (x >= box_x && x < box_x + box.width && y >= box_y && y < box_y + box.height)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question