I have to make a diagram in HTML5 canvas and for them I make arrangements of rectangles with strokeRect. However, these elements must have events and detect when they are clicked and change color, can someone give me a clue on how I can apply an onmouseclic event on a complete array of canvas elements?
I appreciate the attention.