public static function compassOppositePosition($from)
{
$ret = '';
if ($from == 'top') {
$ret = 'bottom';
} elseif ($from == 'bottom') {
$ret = 'top';
} elseif ($from == 'left') {
$ret = 'right';
} elseif ($from == 'right') {
$ret = 'left';
} elseif ($from == 'center') {
$ret = 'center';
}
return $ret;
}