mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Fix InteractiveCurveViewController::moveCursorVertically
for Sequence and Regression (add a TODO for Graph)
This commit is contained in:
@@ -27,6 +27,7 @@ private:
|
||||
BannerView * bannerView() override { return &m_bannerView; }
|
||||
void reloadBannerView() override;
|
||||
bool moveCursorHorizontally(int direction) override;
|
||||
bool moveCursorVertically(int direction) override { return false; } // TODO Emilie
|
||||
Shared::InteractiveCurveViewRange * interactiveCurveViewRange() override { return m_graphRange; }
|
||||
GraphView * functionGraphView() override { return &m_view; }
|
||||
CurveParameterController * curveParameterController() override { return &m_curveParameterController; }
|
||||
|
||||
@@ -148,8 +148,6 @@ void FunctionGraphController::initCursorParameters() {
|
||||
}
|
||||
|
||||
bool FunctionGraphController::moveCursorVertically(int direction) {
|
||||
return false; //TODO LEA
|
||||
#if 0
|
||||
int currentActiveFunctionIndex = indexFunctionSelectedByCursor();
|
||||
Poincare::Context * context = textFieldDelegateApp()->localContext();
|
||||
int nextActiveFunctionIndex = InteractiveCurveViewController::closestCurveIndexVertically(direction > 0, currentActiveFunctionIndex, context);
|
||||
@@ -157,9 +155,9 @@ bool FunctionGraphController::moveCursorVertically(int direction) {
|
||||
return false;
|
||||
}
|
||||
selectFunctionWithCursor(nextActiveFunctionIndex);
|
||||
m_cursor->moveTo(m_cursor->x(), yValue(nextActiveFunctionIndex, m_cursor->x(), context));
|
||||
Poincare::Coordinate2D<double> cursorPosition = xyValues(nextActiveFunctionIndex, m_cursor->x(), context);
|
||||
m_cursor->moveTo(cursorPosition.x1(), cursorPosition.x1(), cursorPosition.x2());
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
CurveView * FunctionGraphController::curveView() {
|
||||
|
||||
@@ -221,8 +221,6 @@ bool InteractiveCurveViewController::isCursorVisible() {
|
||||
}
|
||||
|
||||
int InteractiveCurveViewController::closestCurveIndexVertically(bool goingUp, int currentCurveIndex, Poincare::Context * context) const {
|
||||
return 0; //TODO LEA
|
||||
#if 0
|
||||
double x = m_cursor->x();
|
||||
double y = m_cursor->y();
|
||||
double nextY = goingUp ? DBL_MAX : -DBL_MAX;
|
||||
@@ -232,7 +230,7 @@ int InteractiveCurveViewController::closestCurveIndexVertically(bool goingUp, in
|
||||
if (!closestCurveIndexIsSuitable(i, currentCurveIndex)) {
|
||||
continue;
|
||||
}
|
||||
double newY = yValue(i, x, context);
|
||||
double newY = xyValues(i, x, context).x2();
|
||||
if (!suitableYValue(newY)) {
|
||||
continue;
|
||||
}
|
||||
@@ -275,7 +273,6 @@ int InteractiveCurveViewController::closestCurveIndexVertically(bool goingUp, in
|
||||
}
|
||||
}
|
||||
return nextCurveIndex;
|
||||
#endif
|
||||
}
|
||||
|
||||
float InteractiveCurveViewController::cursorBottomMarginRatio() {
|
||||
|
||||
Reference in New Issue
Block a user