* @private
()
| 1057 | * @private |
| 1058 | */ |
| 1059 | bindUserEvents() { |
| 1060 | const listeners = this._listeners; |
| 1061 | const platform = this.platform; |
| 1062 | |
| 1063 | const _add = (type, listener) => { |
| 1064 | platform.addEventListener(this, type, listener); |
| 1065 | listeners[type] = listener; |
| 1066 | }; |
| 1067 | |
| 1068 | const listener = (e, x, y) => { |
| 1069 | e.offsetX = x; |
| 1070 | e.offsetY = y; |
| 1071 | this._eventHandler(e); |
| 1072 | }; |
| 1073 | |
| 1074 | each(this.options.events, (type) => _add(type, listener)); |
| 1075 | } |
| 1076 | |
| 1077 | /** |
| 1078 | * @private |