mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-13 15:03:36 +00:00
Improved limits of zoomed in slider in footer for stack linear chart.
This commit is contained in:
@@ -938,7 +938,7 @@ auto StackLinearChartView::maybeLocalZoom(
|
||||
// 1 day in middle of limits.
|
||||
constexpr auto kRangeLength = int(0);
|
||||
constexpr auto kLeftSide = int(kLimitLength / 2 + kRangeLength);
|
||||
constexpr auto kRightSide = int(kLimitLength / 2);
|
||||
constexpr auto kRightSide = int(kLimitLength / 2) + int(1);
|
||||
|
||||
_transition.progress = args.progress;
|
||||
if (args.type == LocalZoomArgs::Type::SkipCalculation) {
|
||||
@@ -963,7 +963,7 @@ auto StackLinearChartView::maybeLocalZoom(
|
||||
float64(localRangeIndex + kRangeLength),
|
||||
};
|
||||
_transition.zoomedInLimitXIndices = (xIndex < kLeftSide)
|
||||
? Limits{ 0, kLimitLength + kRangeLength }
|
||||
? Limits{ 0, kLeftSide + kRightSide }
|
||||
: (xIndex > (backIndex - kRightSide - kRangeLength))
|
||||
? Limits{ float64(backIndex - kLimitLength), float64(backIndex) }
|
||||
: Limits{ float64(xIndex - kLeftSide), float64(xIndex + kRightSide) };
|
||||
|
||||
Reference in New Issue
Block a user