Skip to content

Commit fe9b404

Browse files
committed
add TODO comments to avoid casting to Array in supply defaults
1 parent 59557c1 commit fe9b404

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/plots/smith/layout_defaults.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var constants = require('./constants');
1717
var axisNames = constants.axisNames;
1818

1919
var makeImagDflt = memoize(function(realTickvals) {
20+
// TODO: handle this case outside supply defaults step
2021
if(Lib.isTypedArray(realTickvals)) realTickvals = Array.from(realTickvals);
2122

2223
return realTickvals.slice().reverse().map(function(x) { return -x; })
@@ -71,6 +72,7 @@ function handleDefaults(contIn, contOut, coerce, opts) {
7172
coerceAxis('tickvals', imagTickvalsDflt);
7273
}
7374

75+
// TODO: handle this case outside supply defaults step
7476
if(Lib.isTypedArray(axOut.tickvals)) axOut.tickvals = Array.from(axOut.tickvals);
7577

7678
var dfltColor;

src/traces/scatterpolar/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function handleRThetaDefaults(traceIn, traceOut, layout, coerce) {
7171
var r = coerce('r');
7272
var theta = coerce('theta');
7373

74+
// TODO: handle this case outside supply defaults step
7475
if(Lib.isTypedArray(r)) {
7576
traceOut.r = r = Array.from(r);
7677
}

src/traces/scattersmith/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ function handleRealImagDefaults(traceIn, traceOut, layout, coerce) {
7575
len = Math.min(real.length, imag.length);
7676
}
7777

78+
// TODO: handle this case outside supply defaults step
7879
if(Lib.isTypedArray(real)) {
7980
traceOut.real = real = Array.from(real);
8081
}

0 commit comments

Comments
 (0)