Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

HTML5 Canvas & JavaScript - Need Help!


Mammoth
 Share

Recommended Posts

Alright, so I am making a map editor (mostly for learning), and I am at the point where I have click detection to find the tile that you clicked on, but when I try to make that single tile change colour to blue, the whole canvas fills with blue – as if it's filling every tile with it.

[http://jsfiddle.net/9wUUh/](http://jsfiddle.net/9wUUh/)

I only want the tile that I clicked on to change to blue. I already have the detection going on, and my "if" statement at the end works wonderfully. I'm not sure why the whole thing turns blue upon click.

Any help?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...