Canvas is resized to parent div on tpl load