动画demo完成

This commit is contained in:
艾竹
2023-01-27 14:54:03 +08:00
parent 64ea56f01e
commit 72e3efb052
81 changed files with 1211 additions and 503 deletions

View File

@@ -5,23 +5,20 @@ namespace AIStudio.Wpf.DiagramDesigner
{
public class LinkPointDesignerItemViewModel : DesignerItemViewModelBase
{
public Point CurrentLocation
public LinkPointDesignerItemViewModel(Point location) : this(null, location)
{
get
{
return new Point() { X = Left + ItemWidth / 2, Y = Top + ItemHeight / 2 };
}
}
public LinkPointDesignerItemViewModel(Point location) : base()
public LinkPointDesignerItemViewModel(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()
protected override void Init(IDiagramViewModel root)
{
base.Init();
base.Init(root);
this.ClearConnectors();
this.AddConnector(new FullyCreatedConnectorInfo(this, ConnectorOrientation.None, true));
@@ -29,5 +26,13 @@ namespace AIStudio.Wpf.DiagramDesigner
ItemWidth = 5;
ItemHeight = 5;
}
public Point CurrentLocation
{
get
{
return new Point() { X = Left + ItemWidth / 2, Y = Top + ItemHeight / 2 };
}
}
}
}