Extends
- Window_Scrollable
Mixes In
Classes
Methods
-
Clears all data
-
-
Refreshes arrows
-
-
Initializes a window
Name Type Description object
Number | Graphics | Object optional The X coordinate or Graphics or object with parameters y
Number optional The Y coordinate (if object is Number) width
Number optional Width of the window (if object is Number) height
Number | String optional Height of the window or number of lines (String) (if object is Number) object.x
Number optional The X coordinate object.y
Number optional The Y coordinate object.width
Number optional Width of the window object.height
Number | String optional Height of the window or number of lines (String) Examples
const window = new DKTools.Window.Scrollable(0, 0, 100, 100);
const window = new DKTools.Window.Scrollable(Graphics);
const window = new DKTools.Window.Scrollable({ x: 0, y: 0, width: 200, height: 200 });
const window = new DKTools.Window.Scrollable(50, 50, 400, '2');
-
Returns true if the horizontal scrolling
Returns:
Type Description Boolean Horizontal scrolling -
Returns the height of the item
Returns:
Type Description Number Height of the item -
Returns the width of the item
Returns:
Type Description Number Width of the item -
Handles item change
Name Type Description item
* Item lastItem
* Last item -
Returns:
Type Description Number -
Returns:
Type Description Number -
Processes page scroll
-
Processes wheel scroll
-
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 -
Sets the height of the item
Name Type Description height
function | Number optional Height of the item -
Sets the width of the item
Name Type Description width
function | Number optional Width of the item -
Smooth scrolls to left
Name Type Description cols
Number Cols to scroll -
Smooth scrolls to right
Name Type Description cols
Number Cols to scroll -
Updates the window
-
Updates the arrows
-
Updates the origin