mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
线条控件
This commit is contained in:
@@ -56,8 +56,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
if (Root != null && Root.ColorViewModel != null)
|
||||
{
|
||||
this.ColorViewModel = CopyHelper.Mapper(Root.ColorViewModel);
|
||||
this.ColorViewModel = CopyHelper.Mapper(Root.ColorViewModel);
|
||||
}
|
||||
this.ColorViewModel.FillColor.Color = Colors.Red;
|
||||
if (sinkConnectorInfo is FullyCreatedConnectorInfo sink && sink.DataItem.ShowArrow == false)
|
||||
{
|
||||
this.ColorViewModel.RightArrowPathStyle = ArrowPathStyle.None;
|
||||
@@ -714,7 +715,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
label.IsSelected = true;
|
||||
Labels.Add(label);
|
||||
|
||||
var paths = Labels.Count > 0 ? PathGeneratorResult.Paths.Select(p => new SvgPath(p)).ToArray() : Array.Empty<SvgPath>();
|
||||
var paths = Labels.Count > 0 ? PathGeneratorResult?.Paths.Select(p => new SvgPath(p)).ToArray() : Array.Empty<SvgPath>();
|
||||
label.UpdatePosition(paths);
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
public void UpdatePosition(SvgPath[] paths)
|
||||
{
|
||||
if (paths == null)
|
||||
return;
|
||||
|
||||
var position = FindPosition(paths);
|
||||
if (position == null)
|
||||
return;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
ColorViewModel = new ColorViewModel()
|
||||
{
|
||||
LineColor = new ColorObject() { Color = Color.FromArgb(0xAA, 0x00, 0x00, 0x80) },
|
||||
FillColor = new ColorObject() { Color = Colors.Lavender },
|
||||
FillColor = new ColorObject() { Color = Colors.White },
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user