MCPcopy Index your code
hub / github.com/microsoft/SandDance / destroy

Method destroy

docs/app/js/sanddance-app.js:92343–92359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92341 }
92342 // Tear down internal event management implementations.
92343 destroy() {
92344 if (this.element) {
92345 // wheelInput etc. are created in setElement() and therefore
92346 // cannot exist if there is no element
92347 this.wheelInput.destroy();
92348 this.moveInput.destroy();
92349 this.keyInput.destroy();
92350 this.contextmenuInput.destroy();
92351 this.manager.destroy();
92352 this.wheelInput = null;
92353 this.moveInput = null;
92354 this.keyInput = null;
92355 this.contextmenuInput = null;
92356 this.manager = null;
92357 this.element = null;
92358 }
92359 }
92360 /** Register an event handler function to be called on `event` */ on(event, handler, opts) {
92361 this._addEventHandler(event, handler, opts, false);
92362 }

Callers 1

setElementMethod · 0.95

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected