Home Reference Source
import WindowBehavior from '@osjs/client/src/window-behavior.js'
public class | source

WindowBehavior

Default Window Behavior

Controls certain events and their interaction with a window

Constructor Summary

Public Constructor
public

constructor(core: Core)

Create window behavior

Member Summary

Public Members
public

$lofi: Element

LoFi DOM Element

public

Core instance reference

public

Last action

Method Summary

Public Methods
public

click(ev: Event, win: Window)

Handles Mouse Click Event

public

dblclick(ev: Event, win: Window)

Handles Mouse Double Click Event

public

iconClick(ev: Event, win: Window)

Handles Icon Click Event

public

iconDblclick(ev: Event, win: Window)

Handles Icon Double Click Event

public

init(win: Window)

Initializes window behavior

public

mousedown(ev: Event, win: Window)

Handles Mouse Down Event

Public Constructors

public constructor(core: Core) source

Create window behavior

Params:

NameTypeAttributeDescription
core Core

Core reference

Public Members

public $lofi: Element source

LoFi DOM Element

public core: Core source

Core instance reference

public lastAction: string source

Last action

Public Methods

public click(ev: Event, win: Window) source

Handles Mouse Click Event

Params:

NameTypeAttributeDescription
ev Event

Browser Event

win Window

Window reference

public dblclick(ev: Event, win: Window) source

Handles Mouse Double Click Event

Params:

NameTypeAttributeDescription
ev Event

Browser Event

win Window

Window reference

public iconClick(ev: Event, win: Window) source

Handles Icon Click Event

Params:

NameTypeAttributeDescription
ev Event

Browser Event

win Window

Window reference

public iconDblclick(ev: Event, win: Window) source

Handles Icon Double Click Event

Params:

NameTypeAttributeDescription
ev Event

Browser Event

win Window

Window reference

public init(win: Window) source

Initializes window behavior

Params:

NameTypeAttributeDescription
win Window

Window reference

public mousedown(ev: Event, win: Window) source

Handles Mouse Down Event

Params:

NameTypeAttributeDescription
ev Event

Browser Event

win Window

Window reference