Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
publicAPI.setContainer = (container) => {
if (model.container === container) {
return;
}
if (model.container) {
cornerstone.disable(model.container);
}
model.container = container;
if (container) {
cornerstone.enable(container);
cornerstoneTools.makeUnselectable(container);
}
resetRenderer();
};
disableViewport: viewportElement => {
if (viewportElement) {
cornerstone.disable(viewportElement);
}
},
updateViewportPreview: (viewportElement, downloadCanvas, fileType) =>
componentWillUnmount() {
const clear = true;
this._bindInternalEventListeners(clear);
this._bindExternalEventListeners(clear);
this._setupLoadHandlers(clear);
if (this.props.isStackPrefetchEnabled) {
_enableStackPrefetching(this.element, clear);
}
cornerstoneTools.clearToolState(this.element, 'stackPrefetch');
cornerstoneTools.stopClip(this.element);
if (this.props.resizeThrottleMs) {
windowResizeHandler.disable(this.element);
}
cornerstone.disable(this.element);
}