Returns the views that are opposite to the given set of views.
Above and below are opposites, and so are left and right.
"at" is a special case. It is considered opposite to any view in the sense
that if it is not present in views it will always be included in the
returned array. However it is not "strongly" opposite in the sense that it
will not cause other views to be included in the result unless it is the
only view in views. That is, there are two sets of strongly opposite pairs
("above"/"below" and "left"/"right") and at least one of the two opposing
views of a pair must be present for the other one to be included, except in
the special case of views being "at". See examples below for
clarification.
Note that the order of the returned array is not defined.
Example
Returns ["above", "below", "left", "right"] (not definite order), since
"at" is the only view present and is opposite to all:
getOppositeViews("at"); // -> ["above", "below", "left", "right"] (not necessarily in this order)
Example
Returns ["below"]. "left" and "right" are NOT included even though "at" is
given, because at least one of the two opposing views of a pair must be
present for the other one to be included (except in the special case of
views being "at").
getOppositeViews("at,above"); // -> ["below"]
Example
getOppositeViews("above"); // -> ["at", "below"] (not necessarily in this order)
Example
getOppositeViews("above,below"); // -> ["at"]
Example
getOppositeViews("at,above,below"); // -> []
Example
getOppositeViews("above,right"); // -> ["at", "below", "left"] (not necessarily in this order)
Example
getOppositeViews("at,above,right"); // -> ["below", "left"] (not necessarily in this order)
Throws
LisnUsageError
If the given view is not valid, including if it's empty "".
Returns the views that are opposite to the given set of views.
Above and below are opposites, and so are left and right.
"at" is a special case. It is considered opposite to any view in the sense that if it is not present in
views
it will always be included in the returned array. However it is not "strongly" opposite in the sense that it will not cause other views to be included in the result unless it is the only view inviews
. That is, there are two sets of strongly opposite pairs ("above"/"below" and "left"/"right") and at least one of the two opposing views of a pair must be present for the other one to be included, except in the special case ofviews
being "at". See examples below for clarification.Note that the order of the returned array is not defined.
Example
Returns ["above", "below", "left", "right"] (not definite order), since "at" is the only view present and is opposite to all:
Example
Returns ["below"]. "left" and "right" are NOT included even though "at" is given, because at least one of the two opposing views of a pair must be present for the other one to be included (except in the special case of
views
being "at").Example
Example
Example
Example
Example
Throws
LisnUsageError If the given view is not valid, including if it's empty "".