* @private
()
| 978 | * @private |
| 979 | */ |
| 980 | bindUserEvents() { |
| 981 | const listeners = this._listeners; |
| 982 | const platform = this.platform; |
| 983 | |
| 984 | const _add = (type, listener) => { |
| 985 | platform.addEventListener(this, type, listener); |
| 986 | listeners[type] = listener; |
| 987 | }; |
| 988 | |
| 989 | const listener = (e, x, y) => { |
| 990 | e.offsetX = x; |
| 991 | e.offsetY = y; |
| 992 | this._eventHandler(e); |
| 993 | }; |
| 994 | |
| 995 | each(this.options.events, (type) => _add(type, listener)); |
| 996 | } |
| 997 | |
| 998 | /** |
| 999 | * @private |