Skip to content

Commit 1752d30

Browse files
committed
make uid of expanded trace valid alpha-numerical hashes
1 parent 9a341c1 commit 1752d30

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/plots/plots.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,9 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout) {
657657
var expandedTrace = expandedTraces[j],
658658
fullExpandedTrace = plots.supplyTraceDefaults(expandedTrace, cnt, layout);
659659

660-
// mutate uid w.r.t to expanded index to promote consistency
661-
// between update calls.
662-
expandedTrace.uid = fullExpandedTrace.uid = fullTrace.uid + '-' + j;
660+
// mutate uid here using parent uid and expanded index
661+
// to promote consistency between update calls
662+
expandedTrace.uid = fullExpandedTrace.uid = fullTrace.uid + j;
663663

664664
// add info about parent data trace
665665
fullExpandedTrace.index = i;

test/jasmine/tests/transforms_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ describe('one-to-one transforms:', function() {
117117
assertDims([3]);
118118

119119
var uid = data[0].uid;
120-
expect(gd._fullData[0].uid).toEqual(uid + '-0');
120+
expect(gd._fullData[0].uid).toEqual(uid + '0');
121121

122122
done();
123123
});

0 commit comments

Comments
 (0)