app.display

Provides app's viewport information including resolution, scaling, and orientation. Beside of those, we have access to modify viewport's behavior such as setCursor(...).

Constants#

NameTypeDescription
widthnumberGives number of viewport's width in pixels (px).
heightnumberGives number of viewport's height in pixels (px).
scalenumberScaling relatives to typical desktop screen. Similar to window.devicePixelRatio.
isLandscapebooleanReturns true if current screen is landscape as example Desktop and Laptop screen.

Methods#

NameReturn TypeDescription
setCursorvoidChange cursor to specified kind. Only works on devices with mouse.

setCursor#

app.display.setCursor(name);

Change cursor to specified kind. Only works on devices with mouse.

Parameters:

  1. name: (string type) Must be one of these:
    • "default"
    • "processing"
    • "clickable"
    • "text"
    • "move"
    • "draggable"
    • "dragging"
    • "denied"

Return: void