mxDivResizer

Maintains the size of a div element in Internet Explorer.  This is a workaround for the right and bottom style being ignored in IE.

If you need a div to cover the scrollwidth and -height of a document, then you can use this class as follows:

let resizer = new mxDivResizer(background);
resizer.getDocumentHeight = function()
{
  return document.body.scrollHeight;
}
resizer.getDocumentWidth = function()
{
  return document.body.scrollWidth;
}
resizer.resize();
Summary
mxDivResizerMaintains the size of a div element in Internet Explorer.
Functions
mxDivResizerConstructs an object that maintains the size of a div element when the window is being resized.
resizeWidthBoolean specifying if the width should be updated.
resizeHeightBoolean specifying if the height should be updated.
handlingResizeBoolean specifying if the width should be updated.
resizeUpdates the style of the DIV after the window has been resized.
getDocumentWidthHook for subclassers to return the width of the document (without scrollbars).
getDocumentHeightHook for subclassers to return the height of the document (without scrollbars).

Functions

mxDivResizer

function mxDivResizer(div,
container)

Constructs an object that maintains the size of a div element when the window is being resized.  This is only required for Internet Explorer as it ignores the respective stylesheet information for DIV elements.

Parameters

divReference to the DOM node whose size should be maintained.
containerOptional Container that contains the div.  Default is the window.

resizeWidth

Boolean specifying if the width should be updated.

resizeHeight

Boolean specifying if the height should be updated.

handlingResize

Boolean specifying if the width should be updated.

resize

mxDivResizer.prototype.resize = function()

Updates the style of the DIV after the window has been resized.

getDocumentWidth

mxDivResizer.prototype.getDocumentWidth = function()

Hook for subclassers to return the width of the document (without scrollbars).

getDocumentHeight

mxDivResizer.prototype.getDocumentHeight = function()

Hook for subclassers to return the height of the document (without scrollbars).

function mxDivResizer(div,
container)
Constructs an object that maintains the size of a div element when the window is being resized.
mxDivResizer.prototype.resize = function()
Updates the style of the DIV after the window has been resized.
mxDivResizer.prototype.getDocumentWidth = function()
Hook for subclassers to return the width of the document (without scrollbars).
mxDivResizer.prototype.getDocumentHeight = function()
Hook for subclassers to return the height of the document (without scrollbars).
Close