Magic scrolling...

11 views
Skip to first unread message

Shell (Aridhia Informatics)

unread,
Jan 7, 2014, 10:11:08 AM1/7/14
to choru...@googlegroups.com
Can anyone suggest a way of extending the behaviour of the custom scrolling in Chorus? The #sidebar currently has scrolling behaviour, but we're adding additional scrollable areas - primarily #main_content. The issue seems to be around the handling of browser resize. While the sidebar scroll area resizes correctly, main_content ignores the event.

We've tried adding this.setupScrolling( ... ) in main_content_view.js, but it's not quite working as expected...

S.

Robbie GIll

unread,
Jan 7, 2014, 7:36:41 PM1/7/14
to choru...@googlegroups.com
Hey Shell,

I do not have too much advice on the setupScrolling method, but depending on why and how you want to scroll #main_content, consider looking at the dataset show page (i.e. list of columns). While that page still scrolls the entire page, the action bar acts as a sticky header that gives the impression of #main_content scrolling while giving more real estate to the scrollable content (since the header and nav tabs can still be scrolled off screen.) Either look at a dataset with many columns or make your window sufficiently short to see it in action.

Not sure if this helps or just sidesteps the problem you're experiencing :) - Robbie

Charles Hansen

unread,
Jan 8, 2014, 2:12:54 AM1/8/14
to choru...@googlegroups.com
Hey Shell,

I spent some time fighting those scroll bars, so I still remember a little bit.  Some pointers that might help, not sure what you've tried...

- The element with the scrollbars needs to be on the DOM when 'setupScrolling' is called
- 'setupScrolling' will eventually bind listeners to call 'recalculateScrolling'  on page 'resize' or 'content:changed'.  Is this being called with $('#main_content') as an argument?  You could comment out the setupScrolling in sidebar_view to make this easier
- I don't remember the details, but there are certain parts of some pages that just really don't like being scrolled due to the html/css setup for some reason.  You'd see it try to scroll, but elements would end up in unexpected places.  If you are in this situation, you would be the first person to fix it unless Robbie/Travis pulled off some magic after I left.

Charles


--
You received this message because you are subscribed to the Google Groups "chorus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chorus-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Shell (Aridhia Informatics)

unread,
Mar 19, 2014, 7:47:00 AM3/19/14
to choru...@googlegroups.com
We did eventually solve this, and now have our application broken up into fixed scrolling panels & the application fixed to viewport size. Indeed it did end up being a CSS issue more than anything - a little restructuring of the templates and updated CSS got us most of the way. For the record, we do not Chorus stylesheets as we have our own 'skin', but good call!

1) main_content now contains a scrollpanel
2) the sidebar no longer has a scroll area wrapping it, but individual panels inside the sidebar can have a class attached that will then cause scrollbars to be added to those panels.
3) we hooked into the resize event to relayout panel sizes and additional event allowing us to trigger re-layout of individual panels (less intensive).

S.
Reply all
Reply to author
Forward
0 new messages