|
54 | 54 | }, |
55 | 55 | mounted() { |
56 | 56 | this.getOriginChartsData(); |
57 | | - let that = this; |
| 57 | + let chartScope = this; |
58 | 58 | getPluginGraphsGraph().then(({errno, data}) => { |
59 | 59 | var raw_data = data.data; |
60 | 60 | var data = raw_data; |
|
145 | 145 | nodeInfo = "output"; |
146 | 146 | } |
147 | 147 |
|
148 | | - that.$emit('curNodeUpdated', |
| 148 | + chartScope.$emit('curNodeUpdated', |
149 | 149 | { |
150 | 150 | 'nodeType': nodeType, |
151 | 151 | 'nodeInfo': nodeInfo |
|
195 | 195 | }, |
196 | 196 |
|
197 | 197 | addDragEventForImg() { |
198 | | - let that = this; |
| 198 | + let chartScope = this; |
199 | 199 | // target elements with the "draggable" class |
200 | 200 | interact('.draggable').draggable({ |
201 | 201 | // enable inertial throwing |
|
206 | 206 | dragMovelHandler(event, (target, x, y) => { |
207 | 207 | tansformElement(target, x, y); |
208 | 208 | // compute the proportional value |
209 | | - let triggerEl = that.getBigImgEl(); |
210 | | - let relativeEl = that.getSmallImgDragHandler(); |
| 209 | + let triggerEl = chartScope.getBigImgEl(); |
| 210 | + let relativeEl = chartScope.getSmallImgDragHandler(); |
211 | 211 |
|
212 | 212 | relativeMove({triggerEl, x, y}, relativeEl); |
213 | 213 | }); |
|
233 | 233 | dragMovelHandler(event, (target, x, y) => { |
234 | 234 | tansformElement(target, x, y); |
235 | 235 | // compute the proportional value |
236 | | - let triggerEl = that.getSmallImgEl(); |
237 | | - let relativeEl = that.getBigImgEl(); |
| 236 | + let triggerEl = chartScope.getSmallImgEl(); |
| 237 | + let relativeEl = chartScope.getBigImgEl(); |
238 | 238 |
|
239 | 239 | relativeMove({triggerEl, x, y}, relativeEl); |
240 | 240 | }); |
|
0 commit comments