src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/Shapes/EntityTypeShape.cs
/// <summary>
///     Setup initial shape size and position
/// </summary>
Setup initial shape size and position
Setup initial shape size and position
public override void OnInitialize()
        {
            base.OnInitialize();
             The following code was taken from the Dsl's DslDesigner code to fix up a pathological perf problem
             when all shapes are in the same region.  
             Seed shapes along a gradient so that there is no overlap, favor vertical over horizontal scrolling
             Done in the constructor so it happens before GraphObject initialization
            var randomized = new PointD(
                (EntityDesignerViewModel.EntityShapeLocationSeed % 7) * 3.0, EntityDesignerViewModel.EntityShapeLocationSeed * 1.5);
            var bounds = AbsoluteBounds;
            bounds.Location = randomized;
            AbsoluteBounds = bounds;
            EntityDesignerViewModel.EntityShapeLocationSeed++;
             Provide keyboard shortcuts for collapse and expand of this EntityType shape
            this.KeyUp += EntityTypeShape_KeyUp;
        }
public override void OnInitialize ( ) { base . OnInitialize ( ) ; var randomized = new PointD ( ( EntityDesignerViewModel . EntityShapeLocationSeed % 7 ) * 3.0 , EntityDesignerViewModel . EntityShapeLocationSeed * 1.5 ) ; var bounds = AbsoluteBounds ; bounds . Location = randomized ; AbsoluteBounds = bounds ; EntityDesignerViewModel . EntityShapeLocationSeed ++ ; this . KeyUp += EntityTypeShape_KeyUp ; }
Setup initial shape size and position
Setup initial shape size and position
// // The following code was taken from the Dsl's DslDesigner code to fix up a pathological perf problem // when all shapes are in the same region.   // // Seed shapes along a gradient so that there is no overlap, favor vertical over horizontal scrolling // Done in the constructor so it happens before GraphObject initialization // Provide keyboard shortcuts for collapse and expand of this EntityType shape