Skip to content

Commit 8f9e767

Browse files
committed
rm dataCenter and offset var from mesh3d
1 parent e43e8c1 commit 8f9e767

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/plots/gl3d/scene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
345345
}
346346
}
347347

348-
//Save scale and offset factors
348+
//Save scale
349349
this.dataScale = dataScale;
350350

351351
//Update traces

src/traces/mesh3d/convert.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ proto.update = function(data) {
7676
this.data = data;
7777

7878
//Unpack position data
79-
function toDataCoords(axis, coord, scale, offset) {
79+
function toDataCoords(axis, coord, scale) {
8080
return coord.map(function(x) {
81-
return axis.d2l(x) * scale - offset;
81+
return axis.d2l(x) * scale;
8282
});
8383
}
8484
var positions = zip3(
85-
toDataCoords(layout.xaxis, data.x, scene.dataScale[0], scene.dataCenter[0]),
86-
toDataCoords(layout.yaxis, data.y, scene.dataScale[1], scene.dataCenter[1]),
87-
toDataCoords(layout.zaxis, data.z, scene.dataScale[2], scene.dataCenter[2]));
85+
toDataCoords(layout.xaxis, data.x, scene.dataScale[0]),
86+
toDataCoords(layout.yaxis, data.y, scene.dataScale[1]),
87+
toDataCoords(layout.zaxis, data.z, scene.dataScale[2]));
8888

8989

9090
var cells;

0 commit comments

Comments
 (0)