Search
Window.updateBounds Method
See Also
 






Updates window dimensions after applying changes to DOM elements.

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

 Syntax

JavaScript  Copy Code

function updateBounds ([autoSize])

 Parameters

autoSize
Optional.

Boolean. True to autosize the window, otherwise false.

 Example

The following code handles the windowClosing event of a Window class. The event handler checks the id of the Window and cancels the action and restores the Window to normal size, updating its bounds:

JavaScript  Copy Code

var u = MindFusion.Common.UI;

window.windowClosing.addEventListener(windowClosingEventHandler);

function windowClosingEventHandler(sender, args)
{
  //if the window is registration
  if(sender.id === "registrationForms")
  {
      args.cancel = true;
      sender.restore();
      sender.updateBounds(true);
  }
}

 See Also