()
| 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)) { |
no test coverage detected