changed setSpatialConstraint()