View on GitHub

Devendra's Log

Avoiding HTML5 canvas

Browsers on certain Android devices do not have a hardware accelerated canvas. They do however pan images quite well. The code below modifies the image drag example from my KineticJS post. This is of course quite a simple use case where Canvas is overkill.

You can place pins on the image by clicking anywhere on it. Click or touch a pin and it is removed. Pin placement in the Android browser is broken, pins may not appear where they should. I’ll update the post as soon as I discover why.

Once again, enjoy the Crab Nebula!