added experimental canvas resizing