Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cb2c54b

Browse filesBrowse files
committed
move calendar defaults after early return
1 parent 68af287 commit cb2c54b
Copy full SHA for cb2c54b

File tree

Expand file treeCollapse file tree

3 files changed

+9
-9
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+9
-9
lines changed

‎src/traces/histogram/defaults.js

Copy file name to clipboardExpand all lines: src/traces/histogram/defaults.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
2727
var x = coerce('x'),
2828
y = coerce('y');
2929

30-
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
31-
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
32-
3330
coerce('text');
3431

3532
var orientation = coerce('orientation', (y && !x) ? 'h' : 'v'),
@@ -40,6 +37,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
4037
return;
4138
}
4239

40+
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
41+
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
42+
4343
var hasAggregationData = traceOut[orientation === 'h' ? 'x' : 'y'];
4444
if(hasAggregationData) coerce('histfunc');
4545

‎src/traces/histogram2d/sample_defaults.js

Copy file name to clipboardExpand all lines: src/traces/histogram2d/sample_defaults.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout
1717
var x = coerce('x'),
1818
y = coerce('y');
1919

20-
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
21-
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
22-
2320
// we could try to accept x0 and dx, etc...
2421
// but that's a pretty weird use case.
2522
// for now require both x and y explicitly specified.
@@ -28,6 +25,9 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout
2825
return;
2926
}
3027

28+
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
29+
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
30+
3131
// if marker.color is an array, we can use it in aggregation instead of z
3232
var hasAggregationData = coerce('z') || coerce('marker.color');
3333

‎src/traces/mesh3d/defaults.js

Copy file name to clipboardExpand all lines: src/traces/mesh3d/defaults.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3737
var coords = readComponents(['x', 'y', 'z']);
3838
var indices = readComponents(['i', 'j', 'k']);
3939

40-
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
41-
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
42-
4340
if(!coords) {
4441
traceOut.visible = false;
4542
return;
@@ -52,6 +49,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
5249
});
5350
}
5451

52+
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
53+
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
54+
5555
// Coerce remaining properties
5656
[
5757
'lighting.ambient',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.