|
|
@@ -3050,36 +3050,23 @@ function fireEvent(type) { |
|
|
|
*/ |
|
|
|
this.destroy = function() { |
|
|
|
if (renderer) |
|
|
|
renderer.destroy() |
|
|
|
renderer.destroy(); |
|
|
|
if (listenersAdded) { |
|
|
|
dragFix.removeEventListener('mousedown', onDocumentMouseDown, false); |
|
|
|
dragFix.removeEventListener('dblclick', onDocumentDoubleClick, false); |
|
|
|
document.removeEventListener('mousemove', onDocumentMouseMove, false); |
|
|
|
document.removeEventListener('mouseup', onDocumentMouseUp, false); |
|
|
|
uiContainer.removeEventListener('mousewheel', onDocumentMouseWheel, false); |
|
|
|
uiContainer.removeEventListener('DOMMouseScroll', onDocumentMouseWheel, false); |
|
|
|
container.removeEventListener('mozfullscreenchange', onFullScreenChange, false); |
|
|
|
container.removeEventListener('webkitfullscreenchange', onFullScreenChange, false); |
|
|
|
container.removeEventListener('msfullscreenchange', onFullScreenChange, false); |
|
|
|
container.removeEventListener('fullscreenchange', onFullScreenChange, false); |
|
|
|
window.removeEventListener('resize', onDocumentResize, false); |
|
|
|
window.removeEventListener('orientationchange', onDocumentResize, false); |
|
|
|
uiContainer.removeEventListener('keydown', onDocumentKeyPress, false); |
|
|
|
uiContainer.removeEventListener('keyup', onDocumentKeyUp, false); |
|
|
|
uiContainer.removeEventListener('blur', clearKeys, false); |
|
|
|
container.removeEventListener('keydown', onDocumentKeyPress, false); |
|
|
|
container.removeEventListener('keyup', onDocumentKeyUp, false); |
|
|
|
container.removeEventListener('blur', clearKeys, false); |
|
|
|
document.removeEventListener('mouseleave', onDocumentMouseUp, false); |
|
|
|
dragFix.removeEventListener('touchstart', onDocumentTouchStart, false); |
|
|
|
dragFix.removeEventListener('touchmove', onDocumentTouchMove, false); |
|
|
|
dragFix.removeEventListener('touchend', onDocumentTouchEnd, false); |
|
|
|
dragFix.removeEventListener('pointerdown', onDocumentPointerDown, false); |
|
|
|
dragFix.removeEventListener('pointermove', onDocumentPointerMove, false); |
|
|
|
dragFix.removeEventListener('pointerup', onDocumentPointerUp, false); |
|
|
|
dragFix.removeEventListener('pointerleave', onDocumentPointerUp, false); |
|
|
|
} |
|
|
|
container.innerHTML = ''; |
|
|
|
container.classList.remove('pnlm-container'); |
|
|
|
uiContainer.classList.remove('pnlm-grab'); |
|
|
|
uiContainer.classList.remove('pnlm-grabbing'); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|