mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 23:36:31 +00:00
add results pane
differentiate videos which already has annotations
This commit is contained in:
@@ -313,7 +313,7 @@ public class CanvasEditor : Canvas
|
||||
|
||||
#endregion
|
||||
|
||||
public void RemoveAnnotations(IEnumerable<AnnotationControl> listToRemove)
|
||||
private void RemoveAnnotations(IEnumerable<AnnotationControl> listToRemove)
|
||||
{
|
||||
foreach (var ann in listToRemove)
|
||||
{
|
||||
@@ -321,8 +321,15 @@ public class CanvasEditor : Canvas
|
||||
CurrentAnns.Remove(ann);
|
||||
}
|
||||
}
|
||||
public void RemoveAllAnns() => RemoveAnnotations(CurrentAnns);
|
||||
public void RemoveSelectedAnns() => RemoveAnnotations(CurrentAnns.Where(x => x.IsSelected));
|
||||
|
||||
public void RemoveAllAnns()
|
||||
{
|
||||
foreach (var ann in CurrentAnns)
|
||||
Children.Remove(ann);
|
||||
CurrentAnns.Clear();
|
||||
}
|
||||
|
||||
public void RemoveSelectedAnns() => RemoveAnnotations(CurrentAnns.Where(x => x.IsSelected).ToList());
|
||||
|
||||
private void ClearSelections()
|
||||
{
|
||||
@@ -331,7 +338,8 @@ public class CanvasEditor : Canvas
|
||||
}
|
||||
|
||||
public void ClearExpiredAnnotations(TimeSpan time)
|
||||
{
|
||||
RemoveAnnotations(CurrentAnns.Where(x => time - x.Time > _viewThreshold));
|
||||
{
|
||||
var expiredAnns = CurrentAnns.Where(x => Math.Abs((time - x.Time).TotalMilliseconds) > _viewThreshold.TotalMilliseconds).ToList();
|
||||
RemoveAnnotations(expiredAnns);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user