[fix] Size legend elements correctly so they don't exceed bbox. Close #408