()
| 45 | } |
| 46 | |
| 47 | initEvent() { |
| 48 | this.event = {}; |
| 49 | const eventNames = [{ |
| 50 | wxName: 'touchStart', |
| 51 | ecName: 'mousedown', |
| 52 | }, { |
| 53 | wxName: 'touchMove', |
| 54 | ecName: 'mousemove', |
| 55 | }, { |
| 56 | wxName: 'touchEnd', |
| 57 | ecName: 'mouseup', |
| 58 | }, { |
| 59 | wxName: 'touchEnd', |
| 60 | ecName: 'click', |
| 61 | }]; |
| 62 | |
| 63 | eventNames.forEach((name) => { |
| 64 | this.event[name.wxName] = (e) => { |
| 65 | const touch = e.mp.touches[0]; |
| 66 | this.chart._zr.handler.dispatch(name.ecName, { |
| 67 | zrX: name.wxName === 'tap' ? touch.clientX : touch.x, |
| 68 | zrY: name.wxName === 'tap' ? touch.clientY : touch.y, |
| 69 | }); |
| 70 | }; |
| 71 | }); |
| 72 | } |
| 73 | } |
no outgoing calls
no test coverage detected