mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Factorize InteractiveCurveViewController::moveCursorVertically
This commit is contained in:
committed by
Émilie Feral
parent
f6ceae3b8b
commit
94cf542ba3
@@ -312,7 +312,6 @@ bool GraphController::moveCursorVertically(int direction) {
|
||||
*m_selectedSeriesIndex = closestRegressionSeries;
|
||||
selectRegressionCurve();
|
||||
m_cursor->moveTo(x, yValue(*m_selectedSeriesIndex, x, context));
|
||||
m_store->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -324,11 +323,9 @@ bool GraphController::moveCursorVertically(int direction) {
|
||||
if (dotSelected == m_store->numberOfPairsOfSeries(*m_selectedSeriesIndex)) {
|
||||
// Select the mean dot
|
||||
m_cursor->moveTo(m_store->meanOfColumn(*m_selectedSeriesIndex, 0), m_store->meanOfColumn(*m_selectedSeriesIndex, 1));
|
||||
m_store->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
|
||||
} else {
|
||||
// Select a data point dot
|
||||
m_cursor->moveTo(m_store->get(*m_selectedSeriesIndex, 0, *m_selectedDotIndex), m_store->get(*m_selectedSeriesIndex, 1, *m_selectedDotIndex));
|
||||
m_store->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user