fixed bug when draw_anno is null and cleaned canvas.js