Browse Source
Merge pull request #10104 from AvaloniaUI/pointerwheel_snap_fix
Skip scroll snapping if no snappoints are availble on PointerWheel event
pull/10117/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
|
|
|
@ -613,7 +613,7 @@ namespace Avalonia.Controls.Presenters |
|
|
|
{ |
|
|
|
height = _verticalSnapPoint; |
|
|
|
} |
|
|
|
else if(_verticalSnapPoints != null) |
|
|
|
else if(_verticalSnapPoints != null && _verticalSnapPoints.Count > 0) |
|
|
|
{ |
|
|
|
double yOffset = Offset.Y; |
|
|
|
switch (VerticalSnapPointsAlignment) |
|
|
|
@ -645,7 +645,7 @@ namespace Avalonia.Controls.Presenters |
|
|
|
{ |
|
|
|
width = _horizontalSnapPoint; |
|
|
|
} |
|
|
|
else if(_horizontalSnapPoints != null) |
|
|
|
else if(_horizontalSnapPoints != null && _horizontalSnapPoints.Count > 0) |
|
|
|
{ |
|
|
|
double xOffset = Offset.X; |
|
|
|
switch (VerticalSnapPointsAlignment) |
|
|
|
|