MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / destroy

Method destroy

src/cm/touchSelectionMenu.js:181–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179 }
180
181 destroy() {
182 const root = this.#view.dom;
183 root.removeEventListener("contextmenu", this.#onContextMenu, true);
184 document.removeEventListener(
185 "pointerdown",
186 this.#onGlobalPointerDown,
187 true,
188 );
189 document.removeEventListener("pointerup", this.#onGlobalPointerUp, true);
190 document.removeEventListener(
191 "pointercancel",
192 this.#onGlobalPointerUp,
193 true,
194 );
195 this.#clearMenuShowTimer();
196 cancelAnimationFrame(this.#stateSyncRaf);
197 this.#stateSyncRaf = 0;
198 this.#shiftSelectionSession = null;
199 this.#pendingShiftSelectionClick = null;
200 this.#tooltipObserver?.disconnect();
201 this.#hideMenu(true);
202 }
203
204 setEnabled(enabled) {
205 this.#enabled = !!enabled;

Callers

nothing calls this directly

Calls 3

#clearMenuShowTimerMethod · 0.95
#hideMenuMethod · 0.95
disconnectMethod · 0.65

Tested by

no test coverage detected