Skip to content

Commit e234a7d

Browse files
Олег ГурылевОлег Гурылев
authored andcommitted
Улучшил совпадение визуалки по нодам)
1 parent 1e7e57c commit e234a7d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Northrend/ViewModels/CellViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public void SetColor()
8383
if (IsRoutePoint)
8484
{
8585
CellColor = new SolidColorBrush(Colors.Red);
86+
zIndex = 5;
8687
return;
8788
}
8889

Northrend/ViewModels/MainWindowViewModel.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ private void PreparePoints(INodesMap nodes)
212212
Dispatcher.UIThread.Invoke(() =>
213213
{
214214
AllPoints.Clear();
215-
AllPoints.AddRange(nodes.Collection.Select(x => x.Name));
215+
AllPoints.AddRange(nodes.Collection.Select(x => x.Name));
216+
217+
SelectedFirstPoint = "окно в европу";
218+
SelectedLastPoint = "остров Врангеля";
216219
});
217220

218221
}
@@ -237,7 +240,7 @@ private void PreparePorts(INodesMap nodes)
237240
{
238241
foreach (var port in nodes.Collection)
239242
{
240-
var cell = Cells.FirstOrDefault(x => Math.Abs(x.AssociatedCell.Latitude - port.Latitude) < (decimal)1 & Math.Abs(x.AssociatedCell.Longitude - port.Longitude) < (decimal)1);
243+
var cell = Cells.FirstOrDefault(x => Math.Abs(x.AssociatedCell.Latitude - port.Latitude) < (decimal)0.5 & Math.Abs(x.AssociatedCell.Longitude - port.Longitude) < (decimal)0.5);
241244

242245
if (cell is null)
243246
continue;

0 commit comments

Comments
 (0)