private void HandleLeftButtonUp(IPointerEventArgs e) { if (m_Pointer != null) { ISpatialDocument doc = Scene?.Document; if (doc != null) { m_Hits.Clear(); Coordinate pos = Scene.ViewToWorld(m_Position); 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) { if (!multi) { doc.DeselectAll(); } var pair = m_Hits.First(); IItemsLayer layer = pair.Value; ISpatialItem item = pair.Key; if (layer.IsItemSelected(item)) { if (multi) { layer.DeselectItem(item); } } else { layer.SelectItem(item); } } else { doc.DeselectAll(); } } } }
public SpatialDocument(ISpatialDocument entity) { _id = entity.Id; _coordinates = entity.Coordinates; }
public KnnQueryResultItem(ISpatialDocument document, double distance) { Document = document; Distance = distance; }
public void Add(ISpatialDocument doc) { _docs.Add(doc); }
public SpatialDocument(ISpatialDocument entity) { _id = entity.Id; _coordinates = entity.Coordinates; }
public void Add(ISpatialDocument doc) { _docs.Add(doc); }
public KnnQueryResultItem(ISpatialDocument document, double distance) { Document = document; Distance = distance; }