Placemat
Allows interactive manipulation of elements (drag, hide) over a virtual placemat.
Read time 9 minutesLast updated 11 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Experimental.GraphView
- Assembly: UnityEditor
- Inherits from: GraphElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
public class Placemat : GraphElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
Constructors
Constructor | Description |
|---|---|
| Placemat() | Constructor. |
Properties
Property | Description |
|---|---|
| Collapsed | Whether the placemat is collapsed (true) or expanded (false). |
| CollapsedElements | The list of elements hidden by the placemat when collapsed. The list is empty when the placemat is expanded. |
| CollapsedSize | The size of the placemat when collapsed. |
| Color | The color of the placemat. |
| ExpandedPosition | The rect representing the expanded placemat, regardless of the current collapsed state. |
| title | The title of the placemat. |
| UncollapsedSize | The size of the placemat when expanded. |
| ZOrder | The Z order of the placemat in the PlacematContainer. |
Methods
Method | Description |
|---|---|
| BuildContextualMenu | Adds menu items to the placemat contextual menu. |
| HandleEventBubbleUp | Executes logic on this element during the BubbleUp phase, immediately before this element's BubbleUp callbacks. Calling StopPropagation will prevent further invocations of this method along the propagation path. |
| SetCollapsedElements | Sets the list of collapsed elements. This method is not meant to be called. |
| SetPosition | Sets the placemat position |
| StartEditTitle | Sets the focus to the title of placemat and sets the title for editing. |
Static Methods
Method | Description |
|---|---|
| ComputeElementBounds | Calculates the bounds of a list of graph elements. |
Enums
Enum | Description |
|---|---|
| Placemat.MinSizePolicy | Determines the behavior of the CalculateSelectedNodeBounds method. |