mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-05 01:00:50 +08:00
动画demo完成
This commit is contained in:
@@ -5,6 +5,28 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class PointDesignerItemViewModel : DesignerItemViewModelBase
|
||||
{
|
||||
public PointDesignerItemViewModel(Point location) : this(null, location)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PointDesignerItemViewModel(IDiagramViewModel root, Point location) : base(root)
|
||||
{
|
||||
Left = Math.Max(0, location.X - ItemWidth / 2);
|
||||
Top = Math.Max(0, location.Y - ItemHeight / 2);
|
||||
}
|
||||
|
||||
protected override void Init(IDiagramViewModel root)
|
||||
{
|
||||
base.Init(root);
|
||||
|
||||
this.ClearConnectors();
|
||||
this.AddConnector(new FullyCreatedConnectorInfo(this, ConnectorOrientation.None, true));
|
||||
|
||||
ItemWidth = 5;
|
||||
ItemHeight = 5;
|
||||
}
|
||||
|
||||
private bool _showConnectors = false;
|
||||
public new bool ShowConnectors
|
||||
{
|
||||
@@ -25,24 +47,5 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return new Point() { X = Left + ItemWidth / 2, Y = Top + ItemHeight / 2 };
|
||||
}
|
||||
}
|
||||
|
||||
public PointDesignerItemViewModel(Point location) : base()
|
||||
{
|
||||
Left = Math.Max(0, location.X - ItemWidth / 2);
|
||||
Top = Math.Max(0, location.Y - ItemHeight / 2);
|
||||
}
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
this.ClearConnectors();
|
||||
this.AddConnector(new FullyCreatedConnectorInfo(this, ConnectorOrientation.None, true));
|
||||
|
||||
ItemWidth = 5;
|
||||
ItemHeight = 5;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user