MCPcopy Create free account
hub / github.com/facebook/Rapid / disable

Method disable

modules/behaviors/SelectBehavior.js:92–117  ·  view source on GitHub ↗

* disable * Unbind event handlers

()

Source from the content-addressed store, hash-verified

90 * Unbind event handlers
91 */
92 disable() {
93 if (!this._enabled) return;
94
95 this._enabled = false;
96 this._multiSelection.clear();
97 this._spaceClickDisabled = false;
98 this._longPressTimeout = null;
99 this._showsMenu = false;
100 this._showsMapRouletteMenu = false;
101
102 this.lastDown = null;
103 this.lastUp = null;
104 this.lastMove = null;
105 this.lastSpace = null;
106 this.lastClick = null;
107
108 this._cancelLongPress();
109
110 const eventManager = this.context.systems.gfx.events;
111 eventManager.off('keydown', this._keydown);
112 eventManager.off('keyup', this._keyup);
113 eventManager.off('pointerdown', this._pointerdown);
114 eventManager.off('pointermove', this._pointermove);
115 eventManager.off('pointerup', this._pointerup);
116 eventManager.off('pointercancel', this._pointercancel);
117 }
118
119
120 /**

Callers

nothing calls this directly

Calls 3

_cancelLongPressMethod · 0.95
offMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected