BBox calculator: inverted bbox and js array