craftyjs/Crafty — pull request #839 by starwed (2014-12-01 21:21:19+00:00)
Title: Fix a bug in canvas entity implementation when flipped and rotated

Currently, the canvas context was saved separately for flipped and rotated entities, but restored only once. This totally messes with canvas rendering!

This patch fixes this by only saving the context once if called for. (I also added a couple of comments to the code.)

Unfortunately, we can't have canvas-specific tests in our test suite as currently implemented.

This fixes Bug #837.