Skip to content

Commit ec0a65f

Browse files
documentation and variable name improvements. Thanks @rreusser
1 parent 75e6e48 commit ec0a65f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/plots/plots.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1044,16 +1044,16 @@ plots.supplyTransformDefaults = function(traceIn, traceOut, layout) {
10441044
* and adds the _module to any output transforms.
10451045
* If transforms exist another pass is run so that any generated traces also
10461046
* go through supply defaults. This has the effect of rerunning
1047-
* supplyTransforms. If the transform does not have a `transform` function
1048-
* it could not have generated any new traces and the second stage is
1049-
* unnecessary. We detect this case with the following variables.
1047+
* supplyTransformDefaults. If the transform does not have a `transform`
1048+
* function it could not have generated any new traces and the second stage
1049+
* is unnecessary. We detect this case with the following variables.
10501050
*/
1051-
var isSecondStage = transformIn._module && transformIn._module === _module,
1052-
doSecondStage = _module && typeof _module.transform === 'function';
1051+
var isFirstStage = !(transformIn._module && transformIn._module === _module),
1052+
doLaterStages = _module && typeof _module.transform === 'function';
10531053

10541054
if(!_module) Lib.warn('Unrecognized transform type ' + type + '.');
10551055

1056-
if(_module && _module.supplyDefaults && (!isSecondStage || doSecondStage)) {
1056+
if(_module && _module.supplyDefaults && (isFirstStage || doLaterStages)) {
10571057
transformOut = _module.supplyDefaults(transformIn, traceOut, layout, traceIn);
10581058
transformOut.type = type;
10591059
transformOut._module = _module;

0 commit comments

Comments
 (0)