Class DefaultLayoutMergeStrategy
A default implementation of a LayoutMergeStrategy that:
- Sets the paper size (if not set).
- Copies element x,y positions.
- Copies relationship vertices.
Elements are matched using the following properties, in order:
- the element's full canonical name
- the element's name
- the element's description
public class DefaultLayoutMergeStrategy : LayoutMergeStrategy
- Inheritance
-
DefaultLayoutMergeStrategy
- Implements
- Inherited Members
Methods
CopyLayoutInformation(View, View)
Attempts to copy the visual layout information (e.g. x,y coordinates) of elements and relationships from the specified source view into the specified destination view.
public void CopyLayoutInformation(View viewWithLayoutInformation, View viewWithoutLayoutInformation)
Parameters
viewWithLayoutInformationViewthe source view (e.g. the version stored by the Structurizr service)
viewWithoutLayoutInformationViewthe destination View (e.g. the new version, created locally with code)
findElementView(View, Element)
Finds an element. Override this to change the behaviour.
protected ElementView findElementView(View viewWithLayoutInformation, Element elementWithoutLayoutInformation)
Parameters
viewWithLayoutInformationViewthe view to search
elementWithoutLayoutInformationElementthe Element to find
Returns
- ElementView
The matching ElementView, or null when no suitable element can be matched.