Search
Window.center Method
See Also
 






Positions the Window in the center of its host element or specified rect.

Namespace: MindFusion.Common.UI
File: Window.js

 Syntax

JavaScript  Copy Code

function center ([rect])

 Parameters

rect
Optional.

Rect. The rect to center in.

 Example

The following code creates a new Window instance, sets some of its common properties and calls its center method:

JavaScript  Copy Code
var window = new ui.Window();
window.top = ui.Unit.percentage(25);
window.left = ui.Unit.percentage(25);
window.title = clickedItem.title;
window.data = clickedItem.item;
window.templateUrl = "ChatWindow.html";
window.center();

 See Also