Skip to content

Commit 5da1c59

Browse files
committed
fix cone <-> streamtube restyle
1 parent 273292d commit 5da1c59

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/plots/gl3d/scene.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ function render(scene) {
130130
});
131131
}
132132

133+
// TODO not sure if streamtube x/y/z should be emitted as x/y/z
133134
var pointData = {
134135
x: selection.traceCoordinate[0],
135136
y: selection.traceCoordinate[1],
@@ -448,7 +449,13 @@ proto.plot = function(sceneData, fullLayout, layout) {
448449
}
449450
trace = this.traces[data.uid];
450451
if(trace) {
451-
trace.update(data);
452+
if(trace.data.type === data.type) {
453+
trace.update(data);
454+
} else {
455+
trace.dispose();
456+
trace = data._module.plot(this, data);
457+
this.traces[data.uid] = trace;
458+
}
452459
} else {
453460
trace = data._module.plot(this, data);
454461
this.traces[data.uid] = trace;

0 commit comments

Comments
 (0)