Refer back to instance of ScrollBar

6 views
Skip to first unread message

vail130

unread,
Nov 9, 2011, 2:26:26 PM11/9/11
to LivePipe UI Users
This may be a silly question, but how to I refer back to my instance
of a scroll bar.

I instantiate like this:

var workScrollbar = new Control.ScrollBar('work_scroll_content',
'work_scroll_track', {fixed_scroll_distance: 50});

And I want to disable or destroy it later as a result of a user event.
My code is this:

if(workScrollbar.disabled()) {
workScrollbar.enable();
document.getElementById('workContent').style.overflow = 'hidden';
}

which occurs in a function that gets called as a callback after a user
clicks on something and an animation occurs.

It says:

Uncaught TypeError: Object #<klass> has no method 'disabled'
Uncaught TypeError: Property 'enabled' of object #<klass> is not a
function

All help is greatly appreciated!

Simon A. Eugster

unread,
Nov 9, 2011, 2:52:18 PM11/9/11
to livepipe...@googlegroups.com
Note that there really is no disabled() function: disabled is just an
event, see
https://github.com/syntacticx/livepipe-ui/blob/master/src/scrollbar.js.
Also the �enableD� error you get seems to originate at a different place
since you call enable() (without a d) below. enabled is a property and
not a function.
Reply all
Reply to author
Forward
0 new messages