S
S
syrpo2017-11-10 12:02:37
Classmates
syrpo, 2017-11-10 12:02:37

Is it possible to scroll the OK page to a certain value?

Hello, we encountered such a problem - due to the high top bar with the Odnoklassniki menu - the game does not fit entirely on the screen of most users.
VKontakte uses the proposed function for this:
VK.callMethod("scrollWindow", 200, 500);
On Odnoklassniki, they only found the function to scroll to the top of the screen
https://apiok.ru/dev/sdk/js/ui.scrollToTop
Please tell me, do you plan to finalize the OK API in the near future so that you can scroll the page to a certain value from above?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Egorichev, 2017-11-10
@syrpo

There is a ui.scrollTo method, you can
call it like this: FAPI.UI.scrollTo(int x, int y)
You can use it, you just have to calculate / specify the expected height of the header on Odnoklassniki.
We will consider adding a method that would scroll the page exactly to the start of the game frame, but we cannot say whether it will ever appear.
And thank you for involuntarily drawing attention to the fact that we do not have the scrollTo method in the documentation, we will definitely add it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question