mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 08:26:36 +08:00
内部连接点示例
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
double LineAnimationDuration
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
event PropertyChangedEventHandler PropertyChanged;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user