/// <summary> /// Gets the (first) shape representing the given element in the current view. /// </summary> public static T GetShape <T>(this ModelElement element) where T : NodeShape { return(element.GetShape() as T); }
/// <summary> /// Gets the (first) shape representing the given element, in the given diagram /// </summary> public static T GetShape <T>(this ModelElement element, Diagram diagram) where T : NodeShape { return(element.GetShape(diagram) as T); }
/// <summary> /// Gets the (first) shape representing the given element, in the current view /// </summary> public static NodeShape GetShape(this ModelElement element) { Guard.NotNull(() => element, element); return(element.GetShape(element.Store.GetCurrentDiagram())); }