Skip to content

Commit

Permalink
fix display ConnectorView (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kryeker authored Jan 3, 2024
1 parent 0ed8a86 commit 1be6f04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/VisualFindReferences.Core/Graph/View/ConnectorView.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using VisualFindReferences.Core.Graph.Model;
Expand Down Expand Up @@ -147,7 +148,7 @@ public void BuildCurveData()
var triPoint6 = new Point(center.X + unit.X * InverseScaledLengthWithGap, center.Y + unit.Y * InverseScaledLengthWithGap);
var triPoint2 = new Point(center.X + unit.X * ScaledLengthWithGap, center.Y + unit.Y * ScaledLengthWithGap);

CurveData = string.Format("M{0},{1}L{2},{3} {4},{5} {6},{7} {2},{3} M{8},{9} L{10},{11} M{14},{15} L{16},{17} {12},{13} {14},{15} {18},{19}",
CurveData = string.Format(CultureInfo.InvariantCulture, "M{0},{1}L{2},{3} {4},{5} {6},{7} {2},{3} M{8},{9} L{10},{11} M{14},{15} L{16},{17} {12},{13} {14},{15} {18},{19}",
start.X, start.Y, // 0, 1
triPoint6.X, triPoint6.Y, // 2, 3
triPoint5.X, triPoint5.Y, // 4, 5
Expand All @@ -173,7 +174,7 @@ public void BuildCurveData()
var triPoint1 = new Point(mid.X + cos * InverseScaledWidth, mid.Y + sin * InverseScaledWidth);
var triPoint3 = new Point(mid.X + cos * ScaledWidth, mid.Y + sin * ScaledWidth);

CurveData = string.Format("M{0},{1}L{2},{3} {4},{5} {6},{7} {8},{9} {2},{3} M{6},{7} {10},{11}",
CurveData = string.Format(CultureInfo.InvariantCulture, "M{0},{1}L{2},{3} {4},{5} {6},{7} {8},{9} {2},{3} M{6},{7} {10},{11}",
start.X, start.Y, // 0, 1
mid.X, mid.Y, // 2, 3
triPoint1.X, triPoint1.Y, // 4, 5
Expand Down

0 comments on commit 1be6f04

Please sign in to comment.