Implemented svg canvas resizing (not perfect yet)