defer canvas rendering until onload