|
@@ -82,41 +82,44 @@ Component({
|
82
|
82
|
touchStart(e) {
|
83
|
83
|
if (this.chart && e.touches.length > 0) {
|
84
|
84
|
var touch = e.touches[0];
|
85
|
|
- this.chart._zr.handler.dispatch('mousedown', {
|
|
85
|
+ var handler = this.chart.getZr().handler;
|
|
86
|
+ handler.dispatch('mousedown', {
|
86
|
87
|
zrX: touch.x,
|
87
|
88
|
zrY: touch.y
|
88
|
89
|
});
|
89
|
|
- this.chart._zr.handler.dispatch('mousemove', {
|
|
90
|
+ handler.dispatch('mousemove', {
|
90
|
91
|
zrX: touch.x,
|
91
|
92
|
zrY: touch.y
|
92
|
93
|
});
|
93
|
|
- this.chart._zr.handler.proxy.processGesture(wrapTouch(e), 'start');
|
|
94
|
+ handler.processGesture(wrapTouch(e), 'start');
|
94
|
95
|
}
|
95
|
96
|
},
|
96
|
97
|
|
97
|
98
|
touchMove(e) {
|
98
|
99
|
if (this.chart && e.touches.length > 0) {
|
99
|
100
|
var touch = e.touches[0];
|
100
|
|
- this.chart._zr.handler.dispatch('mousemove', {
|
|
101
|
+ var handler = this.chart.getZr().handler;
|
|
102
|
+ handler.dispatch('mousemove', {
|
101
|
103
|
zrX: touch.x,
|
102
|
104
|
zrY: touch.y
|
103
|
105
|
});
|
104
|
|
- this.chart._zr.handler.proxy.processGesture(wrapTouch(e), 'change');
|
|
106
|
+ handler.processGesture(wrapTouch(e), 'change');
|
105
|
107
|
}
|
106
|
108
|
},
|
107
|
109
|
|
108
|
110
|
touchEnd(e) {
|
109
|
111
|
if (this.chart) {
|
110
|
112
|
const touch = e.changedTouches ? e.changedTouches[0] : {};
|
111
|
|
- this.chart._zr.handler.dispatch('mouseup', {
|
|
113
|
+ var handler = this.chart.getZr().handler;
|
|
114
|
+ handler.dispatch('mouseup', {
|
112
|
115
|
zrX: touch.x,
|
113
|
116
|
zrY: touch.y
|
114
|
117
|
});
|
115
|
|
- this.chart._zr.handler.dispatch('click', {
|
|
118
|
+ handler.dispatch('click', {
|
116
|
119
|
zrX: touch.x,
|
117
|
120
|
zrY: touch.y
|
118
|
121
|
});
|
119
|
|
- this.chart._zr.handler.proxy.processGesture(wrapTouch(e), 'end');
|
|
122
|
+ handler.processGesture(wrapTouch(e), 'end');
|
120
|
123
|
}
|
121
|
124
|
}
|
122
|
125
|
}
|