Coffeehouse Post

Single Post Permalink

View Thread: Getting images created in a Canvas context to respond to an event
  • User profile image
    cbae

    Why use a canvas? Why not use an img element and move it around with JavaScript? If these are images that you need to draw dynamically, you need to add the event handler to the canvas element, and then figure if the click coordinates are within the bounds of any of the images you drew.