How to disable or control mouse scrolling from view to view

17 views
Skip to first unread message

Tamara C

unread,
Nov 24, 2014, 6:02:22 AM11/24/14
to web...@googlegroups.com
Hey!

I made some views, but when i scroll with the mouse it "jumps" to another view without me wanting it to do it... 
how can I control this?

thanks!
t

Thomas Handorf

unread,
Nov 24, 2014, 6:09:47 AM11/24/14
to web...@googlegroups.com
Currently neighbor calculation (which influences the scrolling behaviour) is fully automated. We will provide an UI later to manually set which neighboring views can be switched to by swiping or scrolling.

For now you can add the following code snippet into the "Hacker shell" (Ctrl+M) in the "JS" tab. (Example for view "sample1")
var vo=app.views.where({name:'sample1'})[0].view_object;
vo.neighbors.t="top"; // set next view at top to "top"
delete vo.neighbors.b; // delete bottom view
vo.neighbors.l=[]; // set no neighbor views on left side.
vo.neighbors.r=["right_top","right_bottom"]; // set two view on right side

Note: there is only one top or bottom view, while there could be several left or right views. This is because views can be very long (scrolling) and hence many views can be on the side depending on the current scroll position. Copy the above code and change "sample1" to set neighbors for other views. 
Reply all
Reply to author
Forward
0 new messages