create a scrollbox
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
|
Classes
Members
-
height of scrollbox including the scrollbar (if visible) - this changes the size and not the scale of the box
-
width of scrollbox including the scrollbar (if visible)- this changes the size and not the scale of the box
-
content in placed in here you can use any function from pixi-viewport on content to manually move the content (see https://davidfig.github.io/pixi-viewport/jsdoc/)
-
height of scrollbox less the scrollbar (if visible)
-
width of scrollbox less the scrollbar (if visible)
-
dirty value (used for optimizing draws) for underlying viewport (scrollbox.content)
-
disable the scrollbox (if set to true this will also remove the mask)
-
user may drag the content area to scroll content
-
is the horizontal scrollbar visible
-
is the vertical scrollbar visible
-
sets overflowX and overflowY to (scroll, hidden, auto) changing whether the scrollbar is shown scroll = always show scrollbar hidden = hide overflow and do not show scrollbar auto = if content is larger than box size, then show scrollbar
-
sets overflowX to (scroll, hidden, auto) changing whether the scrollbar is shown scroll = always show scrollbar hidden = hide overflow and do not show scrollbar auto = if content is larger than box size, then show scrollbar
-
sets overflowY to (scroll, hidden, auto) changing whether the scrollbar is shown scroll = always show scrollbar hidden = hide overflow and do not show scrollbar auto = if content is larger than box size, then show scrollbar
-
graphics element for drawing the scrollbars
-
offset of horizontal scrollbar (in pixels)
-
offset of vertical scrollbar (in pixels)
-
scrollbar size in pixels
-
height of content area if not set then it uses content.height to calculate height
-
left coordinate of scrollbar
-
top coordinate of scrollbar
-
width of content area if not set then it uses content.width to calculate width
-
call stopPropagation on any events that impact scrollbox
Methods
-
show the scrollbar and restart the timer for fade if options.fade is set
-
ensure that the bounding box is visible
Name Type Description x
number relative to content's coordinate system
y
number width
number height
number -
resize the mask for the container
Name Type Description options
object Name Type Description boxWidth
number optional width of scrollbox including scrollbar (in pixels)
boxHeight
number optional height of scrollbox including scrollbar (in pixels)
scrollWidth
number optional set the width of the inside of the scrollbox (leave null to use content.width)
scrollHeight
number optional set the height of the inside of the scrollbox (leave null to use content.height)
-
call when scrollbox content changes
-
called on each frame to update fade scrollbars (if enabled)
Name Type Description elapsed
number since last frame in milliseconds (usually capped at 16.6667)