Skip to content

Commit cadbbf6

Browse files
committed
fix adding togglehover and add test
1 parent 385e671 commit cadbbf6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/modebar/manage.js

-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ function getButtonGroups(gd) {
246246
enableHover('hoverClosestGl2d');
247247
enableHover('hoverClosestPie');
248248
} else if(b === 'v1hovermode') {
249-
enableHover('toggleHover');
250249
enableHover('hoverClosestCartesian');
251250
enableHover('hoverCompareCartesian');
252251
enableHover('hoverClosestGeo');

test/jasmine/tests/modebar_test.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ describe('ModeBar', function() {
16421642
]);
16431643
})
16441644
.then(function() {
1645-
expect(countButtons()).toBe(initial + 4, 'skip duplicates');
1645+
expect(countButtons()).toBe(initial + 5, 'skip duplicates');
16461646

16471647
return Plotly.relayout(gd, 'modebar.add', [
16481648
'drawline',
@@ -1656,6 +1656,13 @@ describe('ModeBar', function() {
16561656
})
16571657
.then(function() {
16581658
expect(countButtons()).toBe(initial);
1659+
1660+
return Plotly.relayout(gd, 'modebar.add', [
1661+
'togglehover'
1662+
]);
1663+
})
1664+
.then(function() {
1665+
expect(countButtons()).toBe(initial + 1, 'add togglehover');
16591666
})
16601667
.then(done, done.fail);
16611668
});

0 commit comments

Comments
 (0)