(element, callback, options)
| 94982 | const EVENT_TYPE = "contextmenu"; |
| 94983 | class ContextmenuInput extends (0, _inputDefault.default) { |
| 94984 | constructor(element, callback, options){ |
| 94985 | super(element, callback, options); |
| 94986 | this.handleEvent = (event)=>{ |
| 94987 | if (!this.options.enable) return; |
| 94988 | this.callback({ |
| 94989 | type: EVENT_TYPE, |
| 94990 | center: { |
| 94991 | x: event.clientX, |
| 94992 | y: event.clientY |
| 94993 | }, |
| 94994 | srcEvent: event, |
| 94995 | pointerType: "mouse", |
| 94996 | target: event.target |
| 94997 | }); |
| 94998 | }; |
| 94999 | element.addEventListener("contextmenu", this.handleEvent); |
| 95000 | } |
| 95001 | destroy() { |
| 95002 | this.element.removeEventListener("contextmenu", this.handleEvent); |
| 95003 | } |
nothing calls this directly
no outgoing calls
no test coverage detected