mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/zoom] Handle undefined functions
Rework the logic so that :
- an undefined function will be displayed with a clealry defined
null range.
- display both an undefined function and a correct function at the
same time will not affect the correct range.
Change-Id: Ife9dc0d2ace667cab5a6b8826347078fca33e4d5
This commit is contained in:
committed by
Émilie Feral
parent
20cbefad41
commit
958b172d08
@@ -160,12 +160,15 @@ void FunctionGraphController::interestingRanges(InteractiveCurveViewRange * rang
|
||||
float xMin, xMax, yMin, yMax;
|
||||
Poincare::Zoom::CombineRanges(length, xMins, xMaxs, &xMin, &xMax);
|
||||
Poincare::Zoom::CombineRanges(length, yMins, yMaxs, &yMin, &yMax);
|
||||
range->setXMin(xMin);
|
||||
range->setXMax(xMax);
|
||||
range->setYMin(yMin);
|
||||
range->setYMax(yMax);
|
||||
|
||||
yRangeForCursorFirstMove(range);
|
||||
if (std::isfinite(xMin) && std::isfinite(xMax) && std::isfinite(yMin) && std::isfinite(yMax) && xMax > xMin && yMax > yMin) {
|
||||
range->setXMin(xMin);
|
||||
range->setXMax(xMax);
|
||||
range->setYMin(yMin);
|
||||
range->setYMax(yMax);
|
||||
yRangeForCursorFirstMove(range);
|
||||
} else {
|
||||
range->setNullRange();
|
||||
}
|
||||
}
|
||||
|
||||
void FunctionGraphController::yRangeForCursorFirstMove(InteractiveCurveViewRange * range) const {
|
||||
|
||||
Reference in New Issue
Block a user