Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 586a386

Browse files
committed
revert commit 7296fb7
1 parent 9d48c6e commit 586a386

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

src/lib/relink_private.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) {
2525
var toVal = toContainer[k];
2626

2727
if(toVal === fromVal) continue;
28+
if(toContainer.matches && k === '_categoriesMap') continue;
2829

2930
if(k.charAt(0) === '_' || typeof fromVal === 'function') {
3031
// if it already exists at this point, it's something

src/plot_api/plot_api.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,16 +2735,6 @@ function react(gd, data, layout, config) {
27352735

27362736
applyUIRevisions(gd.data, gd.layout, oldFullData, oldFullLayout);
27372737

2738-
var allNames = Object.getOwnPropertyNames(oldFullLayout);
2739-
for(var q = 0; q < allNames.length; q++) {
2740-
var name = allNames[q];
2741-
var start = name.substring(0, 5);
2742-
if(start === 'xaxis' || start === 'yaxis') {
2743-
var emptyCategories = oldFullLayout[name]._emptyCategories;
2744-
if(emptyCategories) emptyCategories();
2745-
}
2746-
}
2747-
27482738
// "true" skips updating calcdata and remapping arrays from calcTransforms,
27492739
// which supplyDefaults usually does at the end, but we may need to NOT do
27502740
// if the diff (which we haven't determined yet) says we'll recalc

test/jasmine/tests/axes_test.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6715,7 +6715,7 @@ describe('more react tests', function() {
67156715

67166716
afterEach(destroyGraphDiv);
67176717

6718-
it('should sort catgories on matching axes using react and relink using relayout', function(done) {
6718+
it('should sort catgories on matching axes using react', function(done) {
67196719
var fig = {
67206720
data: [{
67216721
yaxis: 'y',
@@ -6831,16 +6831,6 @@ describe('more react tests', function() {
68316831
expect(gd._fullLayout.xaxis._categoriesMap).toEqual({Z: 0, 0: 1, A: 2});
68326832
expect(gd._fullLayout.xaxis2._categoriesMap).toEqual({Z: 0, 0: 1, A: 2});
68336833
})
6834-
.then(function() {
6835-
// should get the same order with relayout
6836-
return Plotly.relayout(gd, 'width', 600);
6837-
})
6838-
.then(function() {
6839-
expect(gd._fullLayout.xaxis._categories).toEqual(['Z', '0', 'A']);
6840-
expect(gd._fullLayout.xaxis2._categories).toEqual(['Z', '0', 'A']);
6841-
expect(gd._fullLayout.xaxis._categoriesMap).toEqual({Z: 0, 0: 1, A: 2});
6842-
expect(gd._fullLayout.xaxis2._categoriesMap).toEqual({Z: 0, 0: 1, A: 2});
6843-
})
68446834
.catch(failTest)
68456835
.then(done);
68466836
});

0 commit comments

Comments
 (0)