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