Skip to main content

resize

fires on resizing a window

resize: (state: object, oldState: object, side: object) => void;

Parameters:

  • state: object - an object with the new size and (or) position of a window.
    • The size parameters are:
      • width: number - the width of the window
      • height: number - the height of the window
    • The position parameters are:
      • left: number - the left coordinate of the window's position (in pixels)
      • top: number - the top coordinate of the window's position (in pixels)
  • oldState: object - an object with the previous size and (or) position of a window
    • The size parameters are:
      • width: number - the width of the window
      • height: number - the height of the window
    • The position parameters are:
      • left: number - the left coordinate of the window's position (in pixels)
      • top: number - the top coordinate of the window's position (in pixels)
  • side: object - an object that specifies the direction of resizing. It contains four directions:
    • left: boolean - optional, the left direction
    • right: boolean - optional, the right direction
    • top: boolean - optional, the top direction
    • bottom: boolean - optional, the bottom direction

Example

dhxWindow.events.on("resize", function(state, oldState, side) {
console.log("The window is resized" + state.left, state.top,
state.width, state.height)
});

Related sample: Window. Events