Skip to content
swederik edited this page Oct 27, 2014 · 2 revisions

The resize api call is used to notify cornerstone that the size of the enabled element has changed. Since HTML/JavaScript does not have an easy way to detect changes in DOM element sizes, it is the developers job to detect this and notify cornerstone when this happens. If this is not done, the image will not be displayed properly/

function resize(element, fitToWindow);

Parameters:

  • element - the DOM element that is enabled
  • fitToWindow - optional parameter that if true will cause cornerstone to fit the window to the new size. If not set, the viewport properties are not modified

Returns: Nothing