Skip to content

Commit 19a99e9

Browse files
Merge pull request #729 from plotly/icons
use new cone/streamtube icons
2 parents b8231ab + 8e7a7ba commit 19a99e9

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"draft-js-utils": "^1.2.0",
1515
"fast-isnumeric": "^1.1.1",
1616
"immutability-helper": "^2.7.1",
17-
"plotly-icons": "latest",
17+
"plotly-icons": "1.2.2",
1818
"plotly.js": "1.40.1",
1919
"prop-types": "^15.5.10",
2020
"raf": "^3.4.0",

src/lib/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,8 @@ function renderTraceIcon(trace, prefix = 'Plot') {
5151
return null;
5252
}
5353
const gl = 'gl';
54-
55-
let tempTrace = trace;
56-
if (tempTrace === 'cone') {
57-
tempTrace = 'scatter3d';
58-
} else if (tempTrace === 'streamtube') {
59-
tempTrace = 'line3d';
60-
}
61-
6254
const componentName = `${prefix}${pascalCase(
63-
tempTrace.endsWith(gl) ? tempTrace.slice(0, -gl.length) : tempTrace
55+
trace.endsWith(gl) ? trace.slice(0, -gl.length) : trace
6456
)}Icon`;
6557

6658
return PlotlyIcons[componentName] ? PlotlyIcons[componentName] : PlotlyIcons.PlotLineIcon;

src/lib/traceTypes.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,11 @@ export const traceTypes = _ => [
110110
{
111111
value: 'cone',
112112
label: _('Cone'),
113-
icon: 'scatter3d',
114113
category: chartCategory(_).THREE_D,
115114
},
116115
{
117116
value: 'streamtube',
118117
label: _('Streamtube'),
119-
icon: 'line3d',
120118
category: chartCategory(_).THREE_D,
121119
},
122120
{

0 commit comments

Comments
 (0)