Drawing gene models in HTML Canvas