Skip to content

Commit 2529960

Browse files
committed
temp icons for cone and streamtube 2
1 parent a31bc5a commit 2529960

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/lib/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,18 @@ function renderTraceIcon(trace, prefix = 'Plot') {
6363
return null;
6464
}
6565
const gl = 'gl';
66+
67+
let tempTrace = trace;
68+
if (tempTrace === 'cone') {
69+
tempTrace = 'scatter3d';
70+
} else if (tempTrace === 'streamtube') {
71+
tempTrace = 'line3d';
72+
}
73+
6674
const componentName = `${prefix}${pascalCase(
67-
trace.endsWith(gl) ? trace.slice(0, -gl.length) : trace
75+
tempTrace.endsWith(gl) ? tempTrace.slice(0, -gl.length) : tempTrace
6876
)}Icon`;
77+
6978
return PlotlyIcons[componentName]
7079
? PlotlyIcons[componentName]
7180
: PlotlyIcons.PlotLineIcon;

0 commit comments

Comments
 (0)