Merge pull request #4031 from stephtr/rangeselector-continuous
RangeSelector: Moving past second handle
This commit is contained in:
Коммит
03c3f3c262
|
@ -19,7 +19,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
|
|||
{
|
||||
_absolutePosition += e.HorizontalChange;
|
||||
|
||||
RangeStart = DragThumb(_minThumb, 0, Canvas.GetLeft(_maxThumb), _absolutePosition);
|
||||
RangeStart = DragThumb(_minThumb, 0, DragWidth(), _absolutePosition);
|
||||
|
||||
if (_toolTipText != null)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
|
|||
{
|
||||
_absolutePosition += e.HorizontalChange;
|
||||
|
||||
RangeEnd = DragThumb(_maxThumb, Canvas.GetLeft(_minThumb), DragWidth(), _absolutePosition);
|
||||
RangeEnd = DragThumb(_maxThumb, 0, DragWidth(), _absolutePosition);
|
||||
|
||||
if (_toolTipText != null)
|
||||
{
|
||||
|
|
|
@ -76,14 +76,14 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
|
|||
var position = e.GetCurrentPoint(_containerCanvas).Position.X;
|
||||
var normalizedPosition = ((position / DragWidth()) * (Maximum - Minimum)) + Minimum;
|
||||
|
||||
if (_pointerManipulatingMin && normalizedPosition < RangeEnd)
|
||||
if (_pointerManipulatingMin)
|
||||
{
|
||||
RangeStart = DragThumb(_minThumb, 0, Canvas.GetLeft(_maxThumb), position);
|
||||
RangeStart = DragThumb(_minThumb, 0, DragWidth(), position);
|
||||
UpdateToolTipText(this, _toolTipText, RangeStart);
|
||||
}
|
||||
else if (_pointerManipulatingMax && normalizedPosition > RangeStart)
|
||||
else if (_pointerManipulatingMax)
|
||||
{
|
||||
RangeEnd = DragThumb(_maxThumb, Canvas.GetLeft(_minThumb), DragWidth(), position);
|
||||
RangeEnd = DragThumb(_maxThumb, 0, DragWidth(), position);
|
||||
UpdateToolTipText(this, _toolTipText, RangeEnd);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче