Skip to content

Commit 2727897

Browse files
committed
chore: documentation
1 parent 3212602 commit 2727897

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Scribble/Views/MainView.axaml.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected override void OnDataContextChanged(EventArgs e)
6969
(double canvasWidth, double canvasHeight) = viewModel.GetCanvasDimensions();
7070
CanvasScrollViewer.Offset = new Vector(canvasWidth / 2, canvasHeight / 2);
7171

72+
// Load in all the pointer tools
7273
viewModel.UiStateViewModel.AvailableTools.Clear();
7374
var tools = new List<PointerTool>
7475
{
@@ -102,6 +103,7 @@ protected override void OnDataContextChanged(EventArgs e)
102103
}
103104
}
104105

106+
// If the active tool is a stroke tool, show its options else clear and hide the tool options UI
105107
private void OnActiveToolChanged(PointerTool? tool)
106108
{
107109
_activePointerTool = tool;
@@ -354,7 +356,7 @@ private void SelectionBorder_OnPointerReleased(object? sender, PointerReleasedEv
354356
{
355357
if (e.InitialPressMouseButton == MouseButton.Left && _viewModel != null)
356358
{
357-
foreach (var selection in _viewModel.SelectionTargets)
359+
foreach (var unused in _viewModel.SelectionTargets)
358360
{
359361
_viewModel.ApplyEvent(new EndStrokeEvent(_selection.MoveActionId));
360362
}
@@ -419,7 +421,7 @@ private void SelectionRotationBtn_OnPointerReleased(object? sender, PointerRelea
419421
{
420422
if (e.InitialPressMouseButton == MouseButton.Left && _viewModel != null)
421423
{
422-
foreach (var selection in _viewModel.SelectionTargets)
424+
foreach (var unused in _viewModel.SelectionTargets)
423425
{
424426
_viewModel.ApplyEvent(new EndStrokeEvent(_selection.RotateActionId));
425427
}
@@ -482,7 +484,7 @@ private void ScaleHandle_OnPointerReleased(object? sender, PointerReleasedEventA
482484
{
483485
if (e.InitialPressMouseButton == MouseButton.Left && _viewModel != null && _selection.ActiveScaleHandle != null)
484486
{
485-
foreach (var selection in _viewModel.SelectionTargets)
487+
foreach (var unused in _viewModel.SelectionTargets)
486488
{
487489
_viewModel.ApplyEvent(new EndStrokeEvent(_selection.ScaleActionId));
488490
}

0 commit comments

Comments
 (0)