Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2k
Modebar toggle spikes fixup#4241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1201,20 +1201,23 @@ describe('ModeBar', function() { | ||
| expect(gd._fullLayout.hovermode).toBe('x'); | ||
| assertActive(hovermodeButtons, buttonCompare); | ||
| }); | ||
| it('should makes spikelines visible', function() { | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('on'); | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
| }); | ||
| it('should not become disabled when hovermode is switched off closest', function() { | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('on'); | ||
| buttonCompare.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('on'); | ||
| }); | ||
| it('should keep the state on changing the hovermode', function() { | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('on'); | ||
| @@ -1228,6 +1231,36 @@ describe('ModeBar', function() { | ||
| buttonClosest.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
| }); | ||
| it('should work after clicking on "autoScale2d"', function() { | ||
| var buttonAutoScale = selectButton(modeBar, 'autoScale2d'); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, clicking on the "autoScale2d" modebar button on a graph that has gd._fullLayout._cartesianSpikesEnabled// => 'on'which is obviously wrong. | ||
| buttonAutoScale.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('on'); | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
| }); | ||
| it('should work after clicking on "resetScale2d"', function() { | ||
| var buttonResetScale = selectButton(modeBar, 'resetScale2d'); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('on'); | ||
| buttonResetScale.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('on'); | ||
| buttonToggle.click(); | ||
| expect(gd._fullLayout._cartesianSpikesEnabled).toBe('off'); | ||
| }); | ||
| }); | ||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some history here:
hovermode: 'closest'hovermode, but didn't 🔪 this block