Reference Source
public class | source

Window

Display a moveable, scalable window on the screen, it can be with a title, close button.

See:

Example:

var win = new KQ.Control.Window('example', {
parentID: 'map',
position: {
left: '100px',
top: '100px',
},
});
win.initAsync(function () {
});

Constructor Summary

Public Constructor
public

constructor(template_name: String, options: Object)

Window constructor

Member Summary

Public Members
public

obj: *

public

options: *

Method Summary

Public Methods
public

center(): Null

Centers the window within the viewport

public

close(): Null

Closes a Window

public

async initAsync(callback: function(): null): Promise

Init window

public

open(): Null

Opens a Window and brings it on top of any other open Window

public

setOptions(options: Object): Null

Setting window options

Public Constructors

public constructor(template_name: String, options: Object) source

Window constructor

Params:

NameTypeAttributeDescription
template_name String

the file name of template html

options Object

config params

options.title String

The text in the window title bar.

options.width Number

Specifies width of the window.

options.height Number

Specifies height of the window.

options.action String[]

The buttons for interacting with the window. Predefined array values are "Close", "Refresh", "Minimize", and "Maximize".

options.close function(): null

function will run when close button is clicked.

options.action String[]

The button that interacts with the window."Close", "Refresh", "Minimize", "Maximize".

options.close function(): null

The function runs when the close button is clicked.

Public Members

public obj: * source

public options: * source

Public Methods

public center(): Null source

Centers the window within the viewport

Return:

Null

public close(): Null source

Closes a Window

Return:

Null

public async initAsync(callback: function(): null): Promise source

Init window

Params:

NameTypeAttributeDescription
callback function(): null

callback function will run after initialization

Return:

Promise

public open(): Null source

Opens a Window and brings it on top of any other open Window

Return:

Null

public setOptions(options: Object): Null source

Setting window options

Params:

NameTypeAttributeDescription
options Object

Set options, refer to the constructor

Return:

Null