Skip to content

Commit 515ffbd

Browse files
author
daming-lu
committed
replace 'that' with a better name
1 parent 185a70c commit 515ffbd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

frontend/src/graph/ui/Chart.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
},
5555
mounted() {
5656
this.getOriginChartsData();
57-
let that = this;
57+
let chartScope = this;
5858
getPluginGraphsGraph().then(({errno, data}) => {
5959
var raw_data = data.data;
6060
var data = raw_data;
@@ -145,7 +145,7 @@
145145
nodeInfo = "output";
146146
}
147147
148-
that.$emit('curNodeUpdated',
148+
chartScope.$emit('curNodeUpdated',
149149
{
150150
'nodeType': nodeType,
151151
'nodeInfo': nodeInfo
@@ -195,7 +195,7 @@
195195
},
196196
197197
addDragEventForImg() {
198-
let that = this;
198+
let chartScope = this;
199199
// target elements with the "draggable" class
200200
interact('.draggable').draggable({
201201
// enable inertial throwing
@@ -206,8 +206,8 @@
206206
dragMovelHandler(event, (target, x, y) => {
207207
tansformElement(target, x, y);
208208
// compute the proportional value
209-
let triggerEl = that.getBigImgEl();
210-
let relativeEl = that.getSmallImgDragHandler();
209+
let triggerEl = chartScope.getBigImgEl();
210+
let relativeEl = chartScope.getSmallImgDragHandler();
211211
212212
relativeMove({triggerEl, x, y}, relativeEl);
213213
});
@@ -233,8 +233,8 @@
233233
dragMovelHandler(event, (target, x, y) => {
234234
tansformElement(target, x, y);
235235
// compute the proportional value
236-
let triggerEl = that.getSmallImgEl();
237-
let relativeEl = that.getBigImgEl();
236+
let triggerEl = chartScope.getSmallImgEl();
237+
let relativeEl = chartScope.getBigImgEl();
238238
239239
relativeMove({triggerEl, x, y}, relativeEl);
240240
});

0 commit comments

Comments
 (0)