mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
修复一个大bug
This commit is contained in:
@@ -190,7 +190,11 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mindNode.GetLevel1Node().ConnectorOrientation == ConnectorOrientation.Left)
|
||||
if (mindNode.NodeLevel == 3)
|
||||
{
|
||||
var xx = mindNode.GetLevel1Node();
|
||||
}
|
||||
if (mindNode.GetLevel1Node().ConnectorOrientation == ConnectorOrientation.Left)
|
||||
{
|
||||
double left = mindNode.DesiredMiddlePosition.X + mindNode.ItemWidth / 2 + mindNode.Spacing.Width;
|
||||
double top = mindNode.DesiredMiddlePosition.Y - Math.Min(mindNode.DesiredSize.Height, mindNode.Children.SumOrDefault(p => p.DesiredSize.Height)) / 2;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "SkyBlue",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
@@ -53,7 +53,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xee, 0xf3, 0xf6),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
@@ -63,7 +63,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
@@ -81,7 +81,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "SkyBlueMini",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
@@ -91,7 +91,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xee, 0xf3, 0xf6),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
@@ -101,7 +101,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
@@ -119,7 +119,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "LiteratureGreen",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
@@ -129,7 +129,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xee, 0xf6, 0xee),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
@@ -139,7 +139,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
@@ -157,7 +157,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "LiteratureGreenMini",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
@@ -167,7 +167,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xee, 0xf6, 0xee),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
@@ -177,7 +177,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
@@ -195,7 +195,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "BrainDeadPink",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
@@ -205,7 +205,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xf2),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
@@ -215,7 +215,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
@@ -233,7 +233,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "BrainDeadPinkMini",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
@@ -243,7 +243,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xf2),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
@@ -253,7 +253,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
@@ -271,7 +271,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "RomanticPurple",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
@@ -281,7 +281,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xef, 0xee, 0xf6),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
@@ -291,7 +291,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
@@ -309,7 +309,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "RomanticPurpleMini",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
@@ -319,7 +319,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xef, 0xee, 0xf6),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
@@ -329,7 +329,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
@@ -347,7 +347,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "FreshRed",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
@@ -357,7 +357,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
@@ -367,7 +367,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
@@ -385,7 +385,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "FreshRedMini",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
@@ -395,7 +395,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
@@ -405,7 +405,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
@@ -423,7 +423,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "EarthyYellow",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
@@ -433,7 +433,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xf6, 0xf2, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
@@ -443,7 +443,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
@@ -461,7 +461,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Key = "EarthyYellowMini",
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
@@ -471,7 +471,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xf6, 0xf2, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
@@ -481,7 +481,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
@@ -500,7 +500,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Dark = true,
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
LineColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
@@ -510,7 +510,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
LineColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
@@ -520,7 +520,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.White,
|
||||
LineColor = Colors.White,
|
||||
@@ -539,7 +539,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
Dark = true,
|
||||
MindThemeLevel1 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 110,
|
||||
ItemWidth = 120,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
LineColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
@@ -549,7 +549,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
LineColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
@@ -559,7 +559,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemWidth = 100,
|
||||
ItemHeight = 25,
|
||||
FillColor = Colors.White,
|
||||
LineColor = Colors.White,
|
||||
|
||||
@@ -638,8 +638,12 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
public MindNode GetLevel1Node()
|
||||
{
|
||||
var node = this;
|
||||
while (node.Parent is MindNode mindNode && mindNode.NodeLevel == 1)
|
||||
while (node.Parent is MindNode mindNode)
|
||||
{
|
||||
if (node.NodeLevel == 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
node = mindNode;
|
||||
}
|
||||
return node;
|
||||
|
||||
Reference in New Issue
Block a user