resize
fires on resizing a window
resize: (state: (ISize & IPosition) | ISize | IPosition, oldState: (ISize & IPosition) | ISize | IPosition, side: IDirectionConfig) => void;
Parameters:
state: object
- an object with the new size and (or) position of a windowoldState: object
- an object with the previous size and (or) position of a windowside: object
- an object that specifies the direction of resizing
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
The state/oldState object contains two attributes:
- size - (object) optional, an object with the size of a window. It contains two options:
- width - (number) the width of the window
- height - (number) the height of the window
- position - (object) optional, an object with the position of the window
- left - (number) the left coordinate of the window's position (in pixels)
- top - (number) the top coordinate of the window's position (in pixels)
The side object can contain the following 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