动画支持形状定义demo

This commit is contained in:
艾竹
2023-05-03 17:14:47 +08:00
parent c135a7f144
commit c462d110ff
8 changed files with 619 additions and 15 deletions

View File

@@ -543,7 +543,7 @@ namespace AIStudio.Wpf.DiagramDesigner
if (e.PropertyName == nameof(ShapeViewModel.SourceMarker) ||
e.PropertyName == nameof(ShapeViewModel.SinkMarker))
{
UpdateArea();
UpdatePathGeneratorResult();
}
}
else if (sender is DesignerItemViewModelBase)
@@ -677,8 +677,6 @@ namespace AIStudio.Wpf.DiagramDesigner
StartAngle = PathGeneratorResult.SourceMarkerAngle;
EndAngle = PathGeneratorResult.TargetMarkerAngle;
//StartPoint = new PointBase(source.Value.X - Area.Left - SourceConnectorInfoFully.ConnectorWidth / 2, source.Value.Y - Area.Top - SourceConnectorInfoFully.ConnectorHeight / 2) ;
//EndPoint = new PointBase(target.Value.X - Area.Left - SinkConnectorInfo.ConnectorWidth / 2 , target.Value.Y - Area.Top - SinkConnectorInfo.ConnectorHeight / 2 );
StartPoint = new PointBase(source.Value.X - Area.Left , source.Value.Y - Area.Top );
EndPoint = new PointBase(target.Value.X - Area.Left , target.Value.Y - Area.Top);

View File

@@ -170,7 +170,6 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
private bool _dragStart;
public bool DragStart
{
@@ -190,7 +189,6 @@ namespace AIStudio.Wpf.DiagramDesigner
Y = position.Y;
}
public static ConnectorPointModel operator -(ConnectorPointModel a, ConnectorPointModel b)
{
return new ConnectorPointModel(a.X - b.X, a.Y - b.Y);

View File

@@ -46,7 +46,7 @@ namespace AIStudio.Wpf.DiagramDesigner
if (designerbase is ConnectorVertexItem designer)
{
designer.ConnectorVertexType = designer.ConnectorVertexType;
}
}