Class Index | File Index

Classes


Class osmplayer.scroll


Extends minplayer.display.
This class provides the scroll functionality for the playlists. We can calculate how the scrollbar controls the playlist using the following diagram / equations. ___ ____________ | | |\ | | list | \ | | |y \ | | | \ | |____________| \ _ _____ | | |\ | | | | | | \ | | | | | | \ | |x | | | | \ | | | | | | \|_|_ | | | | | | | | l | window | | | h w | | | |_|_| | | | | /| | | | | | / | | | | | | / v| | | | | | / | | | | |____________|/ |_|____| | | | / | | | / | | | / | | | / |__|____________|/ l - The list height. h - Handle Bar height. w - Window height. x - The distance from top of window to the top of the handle. y - The disatnce from the top of the list to the top of the window. v - The distance from bottom of window to the bottom of the handle. jQuery UI provides "v". We already know "l", "h", "w". We can then calculate the relationship between the scroll bar handle position to the list position using the following equations. x = (w - (v + h)) y = ((l - w)/(w - h)) * x -- or -- y = ((l - w)/(w - h)) * (w - (v + h)) We can statically calculate the ((l - w)/(w - h)) as a ratio and use that to speed up calculations as follows. ratio = ((l - w)/(w - h)); So, our translation equations are as follows... y = ratio * (w - (v + h)) v = w - (h + (y / ratio))
Defined in: osmplayer.scroll.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
osmplayer.scroll(context, options)
Field Summary
Field Attributes Field Name and Description
 
Reset the constructor.
Fields borrowed from class minplayer.plugin:
context, lock, name, options, pluginReady, queue, triggered
Method Summary
Method Attributes Method Name and Description
 
 
 
getMousePos(event)
 
getPos(handlePos)
 
Refresh all the variables that may change.
 
Refreshes the scroll list.
Methods borrowed from class minplayer.display:
fullscreen, fullScreenElement, getDisplay, getElements, getScaledRect, isFullScreen, toggleFullScreen
Methods borrowed from class minplayer.plugin:
addPlugin, bind, checkQueue, create, destroy, get, isValid, poll, ready, trigger, unbind
Class Detail
osmplayer.scroll(context, options)
Parameters:
{object} context
The jQuery context.
{object} options
This components options.
Field Detail
constructor
Reset the constructor.
Method Detail
construct()
See:
minplayer.plugin#construct

getHandlePos(pos)
Parameters:
pos

getMousePos(event)
Parameters:
event

getPos(handlePos)
Parameters:
handlePos

onResize()
Refresh all the variables that may change.

refresh()
Refreshes the scroll list.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Apr 09 2012 17:30:27 GMT-0700 (PDT)