Skip to content

Commit 8860759

Browse files
committed
removed unused midValue attribute
1 parent 109344f commit 8860759

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/traces/surface/convert.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function SurfaceTrace(scene, surface, uid) {
2727
this.showContour = [false, false, false];
2828
this.minValues = [Infinity, Infinity, Infinity];
2929
this.maxValues = [-Infinity, -Infinity, -Infinity];
30-
this.midValues = [0, 0, 0];
3130
this.dataScaleX = 1.0;
3231
this.dataScaleY = 1.0;
3332
this.refineData = true;
@@ -438,15 +437,15 @@ proto.update = function(data) {
438437
}
439438

440439
for(i = 0; i < 3; i++) {
441-
data._objectOffset[i] = this.midValues[i] = 0.5 * (this.minValues[i] + this.maxValues[i]);
440+
data._objectOffset[i] = 0.5 * (this.minValues[i] + this.maxValues[i]);
442441
}
443442

444443
for(i = 0; i < 3; i++) {
445444
for(j = 0; j < xlen; j++) {
446445
for(k = 0; k < ylen; k++) {
447446
v = rawCoords[i][j][k];
448447
if(v !== null && v !== undefined) {
449-
rawCoords[i][j][k] -= this.midValues[i];
448+
rawCoords[i][j][k] -= data._objectOffset[i];
450449
}
451450
}
452451
}

0 commit comments

Comments
 (0)