[apps] Factorize InteractiveCurveViewController::moveCursorVertically

This commit is contained in:
Ruben Dashyan
2019-03-20 13:44:21 +01:00
committed by Émilie Feral
parent f6ceae3b8b
commit 94cf542ba3
3 changed files with 4 additions and 4 deletions

View File

@@ -97,6 +97,10 @@ bool InteractiveCurveViewController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::Down || event == Ion::Events::Up) {
int direction = event == Ion::Events::Down ? -1 : 1;
if (moveCursorVertically(direction)) {
interactiveCurveViewRange()->panToMakePointVisible(
m_cursor->x(), m_cursor->y(),
cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio
);
reloadBannerView();
curveView()->reload();
return true;