MCPcopy Create free account
hub / github.com/apache/cloudstack / detach

Method detach

systemvm/agent/noVNC/core/util/cursor.js:60–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58 }
59
60 detach() {
61 if (!this._target) {
62 return;
63 }
64
65 if (useFallback) {
66 const options = { capture: true, passive: true };
67 this._target.removeEventListener('mouseover', this._eventHandlers.mouseover, options);
68 this._target.removeEventListener('mouseleave', this._eventHandlers.mouseleave, options);
69 this._target.removeEventListener('mousemove', this._eventHandlers.mousemove, options);
70 this._target.removeEventListener('mouseup', this._eventHandlers.mouseup, options);
71
72 if (document.contains(this._canvas)) {
73 document.body.removeChild(this._canvas);
74 }
75 }
76
77 this._target = null;
78 }
79
80 change(rgba, hotx, hoty, w, h) {
81 if ((w === 0) || (h === 0)) {

Callers 1

attachMethod · 0.95

Calls 3

removeEventListenerMethod · 0.80
removeChildMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected