Class: Scrollable

DKTools.Window.Scrollable

new DKTools.Window.Scrollable ()

Since:
  • 11.0.0

Extends

  • Window_Base

Mixes In

Classes

Scrollable
Selectable

Methods

_clearAll () private

Clears all data

_createArrowSprites () private

_refreshArrows ()

Refreshes arrows

_updateArrows () private

clearScrollStatus ()

Clears the scroll status

isHorizontal ()Boolean

Returns true if the horizontal scrolling
Returns:
Type Description
Boolean Horizontal scrolling

isScrollEnabled ()Boolean

Returns true if the scroll enabled
Returns:
Type Description
Boolean Scroll enabled

isTouchedInsideFrame ()Boolean

Returns true if touched inside the frame
Returns:
Type Description
Boolean Touched inside the frame

isTouchScrollEnabled ()Boolean

Returns true if the touch scroll enabled
Returns:
Type Description
Boolean Touch scroll enabled

isWheelScrollEnabled ()Boolean

Returns true if the wheel scroll enabled
Returns:
Type Description
Boolean Wheel scroll enabled

itemHeight ()Number

Returns the height of the item
Returns:
Type Description
Number Height of the item

itemWidth ()Number

Returns the width of the item
Returns:
Type Description
Number Width of the item

maxScrollX ()Number

Returns the max scroll X
Returns:
Type Description
Number Max scroll X

maxScrollY ()Number

Returns the max scroll Y
Returns:
Type Description
Number Max scroll Y

onTouchScroll ()

Handles the scroll

onTouchScrollEnd ()

Handles the end of the scroll

onTouchScrollStart ()

Handles the start of the scroll

overallHeight ()Number

Returns the overall width
Returns:
Type Description
Number Overall height

overallWidth ()Number

Returns the overall width
Returns:
Type Description
Number Overall width

processPageScroll ()

Processes page scroll
Since:
  • 11.1.0

processTouchScroll ()

Processes touch scroll

processWheelScroll ()

Processes wheel scroll

scrollBaseX ()Number

Returns the scroll base X
Returns:
Type Description
Number Scroll base X

scrollBaseY ()Number

Returns the scroll base Y
Returns:
Type Description
Number Scroll base Y

scrollBlockHeight ()Number

Returns the height of the scroll block
Version:
  • 11.1.0
Returns:
Type Description
Number Height of the scroll block

scrollBlockWidth ()Number

Returns the width of the scroll block
Version:
  • 11.1.0
Returns:
Type Description
Number Width of the scroll block

scrollBy (x, y)

Scrolling by coordinates offset
Name Type Description
x Number The X coordinate
y Number The Y coordinate

scrollTo (x, y)

Scroll to coordinates
Name Type Description
x Number The X coordinate
y Number The Y coordinate

scrollX ()Number

Returns the scroll X
Returns:
Type Description
Number Scroll X

scrollY ()Number

Returns the scroll Y
Returns:
Type Description
Number Scroll Y

setScrollAccel (x, y)

Sets the scroll accel
Name Type Description
x Number The X coordinate
y Number The Y coordinate

setupAll (object)

Sets all parameters
Name Type Default Description
object Object {} optional Parameters
Name Type Description
itemWidth function | Number optional Width of the item
itemHeight function | Number optional Height of the item
scrollBlockWidth function | Number optional Width of the scroll block
scrollBlockHeight function | Number optional Height of the scroll block

setupItemHeight (height)

Sets the height of the item
Name Type Description
height function | Number optional Height of the item

setupItemWidth (width)

Sets the width of the item
Name Type Description
width function | Number optional Width of the item

smoothScrollBy (x, y)

Smooth scrolling by coordinates offset
Name Type Description
x Number The X coordinate
y Number The Y coordinate

smoothScrollDown (rows)

Smooth scrolls to down
Name Type Description
rows Number Rows to scroll

smoothScrollLeft (cols)

Smooth scrolls to left
Name Type Description
cols Number Cols to scroll

smoothScrollRight (cols)

Smooth scrolls to right
Name Type Description
cols Number Cols to scroll

smoothScrollTo (x, y)

Smooth scroll to coordinates
Name Type Description
x Number The X coordinate
y Number The Y coordinate

smoothScrollUp (rows)

Smooth scrolls to up
Name Type Description
rows Number Rows to scroll

update ()

Updates the window

updateArrows ()

Updates the arrows

updateOrigin ()

Updates the origin

updateScrollAccel ()

Updates the scroll accel

updateScrollBase (baseX, baseY)

Updates the scroll base
Name Type Description
baseX Number The X base coordinate
baseY Number The Y base coordinate

updateSmoothScroll ()

Updates the smooth scroll