Added sorting of potential placement points so that shapes go to the closest valid point when released.