Cancel line on right click
This commit is contained in:
Родитель
62594428b8
Коммит
1f046ad913
|
@ -91,6 +91,15 @@ namespace ReactiveHistorySample.Avalonia
|
|||
layerCanvas.InvalidateVisual();
|
||||
}
|
||||
}
|
||||
else if (args.MouseButton == MouseButton.Right)
|
||||
{
|
||||
if (line != null)
|
||||
{
|
||||
layer1.Shapes.Remove(line);
|
||||
line = null;
|
||||
layerCanvas.InvalidateVisual();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
layerCanvas.PointerMoved += (sender, args) =>
|
||||
|
|
|
@ -69,6 +69,16 @@ namespace ReactiveHistorySample.Wpf
|
|||
}
|
||||
};
|
||||
|
||||
layerCanvas.PreviewMouseRightButtonDown += (sender, args) =>
|
||||
{
|
||||
if (line != null)
|
||||
{
|
||||
layer1.Shapes.Remove(line);
|
||||
line = null;
|
||||
layerCanvas.InvalidateVisual();
|
||||
}
|
||||
};
|
||||
|
||||
layerCanvas.PreviewMouseMove += (sender, args) =>
|
||||
{
|
||||
var point = args.GetPosition(layerCanvas);
|
||||
|
|
Загрузка…
Ссылка в новой задаче