diff --git a/src/TopoPad.AvaloniaSceneInteraction/TopoPad.AvaloniaSceneInteraction.csproj b/src/TopoPad.AvaloniaSceneInteraction/TopoPad.AvaloniaSceneInteraction.csproj
index b0daada..d5426d6 100644
--- a/src/TopoPad.AvaloniaSceneInteraction/TopoPad.AvaloniaSceneInteraction.csproj
+++ b/src/TopoPad.AvaloniaSceneInteraction/TopoPad.AvaloniaSceneInteraction.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/src/TopoPad.Core/HitTest/ItemsHitTestSpec.cs b/src/TopoPad.Core/HitTest/ItemsHitTestSpec.cs
index 2a962aa..7f8f02b 100644
--- a/src/TopoPad.Core/HitTest/ItemsHitTestSpec.cs
+++ b/src/TopoPad.Core/HitTest/ItemsHitTestSpec.cs
@@ -7,12 +7,12 @@ namespace TopoPad.Core.HitTest
{
public class ItemsHitTestSpec
{
- private Lazy> m_Layers;
+ private Lazy> m_Layers = new Lazy>();
public HashSet Layers => m_Layers.Value;
public bool LimitLayers { get; set; }
- private Lazy> m_SpatialItems;
+ private Lazy> m_SpatialItems = new Lazy>();
public HashSet SpatialItems => m_SpatialItems.Value;
public bool LimitItems { get; set; }
diff --git a/src/TopoPad.Core/Layers/ItemsLayer.cs b/src/TopoPad.Core/Layers/ItemsLayer.cs
index 4be6f3d..7f1696c 100644
--- a/src/TopoPad.Core/Layers/ItemsLayer.cs
+++ b/src/TopoPad.Core/Layers/ItemsLayer.cs
@@ -305,7 +305,7 @@ private bool HitTestCurve(FeatureStyleSet styleSet, Geometry geom,
}
double buffer = (styleSet.LineStyle.Width / 2 +
viewBoundaryBuffer) * viewToWorld;
- return geom.Distance(new Point(x, y)) < buffer;
+ return geom.Distance(new Point(x, y)) <= buffer;
}
private bool HitTestArea(FeatureStyleSet styleSet, Geometry geom,
@@ -331,7 +331,7 @@ private bool HitTestArea(FeatureStyleSet styleSet, Geometry geom,
return true;
}
double buffer = (styleSet.LineStyle.Width / 2 + viewBoundaryBuffer) * viewToWorld;
- return geom.Distance(p) < buffer;
+ return geom.Distance(p) <= buffer;
}
private bool SetNotifyUnregisterRegister(ref FeatureStyleSet field, FeatureStyleSet value,
diff --git a/src/TopoPad.Core/TopoPad.Core.csproj b/src/TopoPad.Core/TopoPad.Core.csproj
index d7a3d8b..c840110 100644
--- a/src/TopoPad.Core/TopoPad.Core.csproj
+++ b/src/TopoPad.Core/TopoPad.Core.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/TopoPad.SceneInteraction/Interactions/ClickSelectInteraction.cs b/src/TopoPad.SceneInteraction/Interactions/ClickSelectInteraction.cs
index ed0f17d..d98e8ca 100644
--- a/src/TopoPad.SceneInteraction/Interactions/ClickSelectInteraction.cs
+++ b/src/TopoPad.SceneInteraction/Interactions/ClickSelectInteraction.cs
@@ -69,7 +69,7 @@ private void HandleLeftButtonUp(IPointerEventArgs e)
{
m_Hits.Clear();
Coordinate pos = Scene.ViewToWorld(m_Position);
- doc.HitTest(pos.X, pos.Y, 3, 1 / Scene.Scale,
+ doc.HitTest(pos.X, pos.Y, 5, 1 / Scene.Scale,
m_HitTestSpec, m_Hits);
bool multi = e.KeyModifiers.HasFlag(KeyModifiers.Shift);
if (m_Hits.Count == 1)
diff --git a/src/TopoPad/App.xaml b/src/TopoPad/App.xaml
index 53ae4c8..624aa0d 100644
--- a/src/TopoPad/App.xaml
+++ b/src/TopoPad/App.xaml
@@ -15,6 +15,6 @@ full text of the license.
-
+
diff --git a/src/TopoPad/Program.cs b/src/TopoPad/Program.cs
index 446e867..dc3a003 100644
--- a/src/TopoPad/Program.cs
+++ b/src/TopoPad/Program.cs
@@ -19,7 +19,7 @@ public static void Main(string[] args) => BuildAvaloniaApp()
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure()
.UsePlatformDetect()
- .LogToDebug()
+ .LogToTrace()
.UseReactiveUI();
}
}
diff --git a/src/TopoPad/TopoPad.csproj b/src/TopoPad/TopoPad.csproj
index 43f7b90..a8e8be5 100644
--- a/src/TopoPad/TopoPad.csproj
+++ b/src/TopoPad/TopoPad.csproj
@@ -38,14 +38,14 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/src/TopoPad/Views/LayersView.xaml b/src/TopoPad/Views/LayersView.xaml
index b357a2b..c0363a1 100644
--- a/src/TopoPad/Views/LayersView.xaml
+++ b/src/TopoPad/Views/LayersView.xaml
@@ -13,7 +13,6 @@ full text of the license.
xmlns:tpcl="clr-namespace:TopoPad.Core.Layers;assembly=TopoPad.Core"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:ia="clr-namespace:Avalonia.Xaml.Interactions.Core;assembly=Avalonia.Xaml.Interactions"
- xmlns:iac="clr-namespace:Avalonia.Xaml.Interactions.Custom;assembly=Avalonia.Xaml.Interactions.Custom"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="TopoPad.Views.LayersView">