Mammoth Posted January 20, 2014 Author Share Posted January 20, 2014 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 More sharing options...
unknown Posted January 20, 2014 Share Posted January 20, 2014 [http://jsfiddle.net/9wUUh/10/](http://jsfiddle.net/9wUUh/10/)fillRect is what you want Link to comment Share on other sites More sharing options...
Mammoth Posted January 20, 2014 Author Share Posted January 20, 2014 Ah… that works beautifully. Thanks! Seems like a simple mistake. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now