内部连接点示例

This commit is contained in:
艾竹
2023-02-04 16:38:56 +08:00
parent 0d6debe87f
commit e8f91abd68
12 changed files with 153 additions and 21 deletions

View File

@@ -150,6 +150,19 @@ namespace AIStudio.Wpf.DiagramDesigner
SetProperty(ref _lineAnimation, value);
}
}
private double _lineAnimationDuration = 1;
public double LineAnimationDuration
{
get
{
return _lineAnimationDuration;
}
set
{
SetProperty(ref _lineAnimationDuration, value);
}
}
}

View File

@@ -33,6 +33,10 @@ namespace AIStudio.Wpf.DiagramDesigner
{
get; set;
}
double LineAnimationDuration
{
get; set;
}
event PropertyChangedEventHandler PropertyChanged;
}
}

View File

@@ -476,11 +476,16 @@ namespace AIStudio.Wpf.DiagramDesigner
case nameof(DesignerItemViewModelBase.ItemWidth):
case nameof(DesignerItemViewModelBase.Left):
case nameof(DesignerItemViewModelBase.Top):
SourceA = PointHelper.GetPointForConnector(this.SourceConnectorInfo);
if (IsFullConnection)
{
//减少触发一次画线
SourceA = PointHelper.GetPointForConnector(this.SourceConnectorInfo);
SourceB = PointHelper.GetPointForConnector(this.SinkConnectorInfoFully);
}
else
{
SourceA = PointHelper.GetPointForConnector(this.SourceConnectorInfo);
}
break;
}
}
@@ -519,12 +524,7 @@ namespace AIStudio.Wpf.DiagramDesigner
}
else if (sender is ColorViewModel)
{
switch (e.PropertyName)
{
case nameof(ColorViewModel.LineAnimation):
RaisePropertyChanged(nameof(PathGeneratorResult));
break;
}
}
}