VertexOrEdgeCanBeSelected
(
IMetadataProvider oVertexOrEdge,
Boolean bSelected
)
{
Debug.Assert(oVertexOrEdge != null);
AssertValid();
if (!bSelected)
{
// A vertex or edge can always be deselected.
return (true);
}
switch ( VertexAndEdgeDrawerBase.GetVisibility(oVertexOrEdge) )
{
case VisibilityKeyValue.Visible:
return (true);
case VisibilityKeyValue.Hidden:
return (false);
case VisibilityKeyValue.Filtered:
// A filtered vertex or edge can be selected as long as it is
// not completely transparent.
return (this.EdgeDrawer.FilteredAlpha > 0);
default:
Debug.Assert(false);
return (true);
}
}