-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support extreme off-plot data points in scatter lines #2060
Changes from 1 commit
3130d1c
231883f
4b0b5d3
5ec5dbf
8d3ef29
37b5cdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -408,6 +408,19 @@ describe('Test Plots', function() { | |
beforeEach(function(done) { | ||
gd = createGraphDiv(); | ||
Plotly.plot(gd, [{ x: [1, 2, 3], y: [2, 3, 4] }], {}).then(done); | ||
|
||
// hacky: simulate getting stuck with these flags due to an error | ||
// see #2055 and commit 6a44a9a - before fixing that error, we would | ||
// end up in an inconsistent state that prevented future Plotly.newPlot | ||
// because _dragging and _dragged were not cleared by purge. | ||
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. That's the first time I'd seen an error that blocked all future 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. Yep, very nice. Thanks! |
||
gd._dragging = true; | ||
gd._dragged = true; | ||
gd._hoverdata = true; | ||
gd._snapshotInProgress = true; | ||
gd._editing = true; | ||
gd._replotPending = true; | ||
gd._mouseDownTime = true; | ||
gd._legendMouseDownTime = true; | ||
}); | ||
|
||
afterEach(destroyGraphDiv); | ||
|
@@ -416,15 +429,16 @@ describe('Test Plots', function() { | |
var expectedKeys = [ | ||
'_ev', '_internalEv', 'on', 'once', 'removeListener', 'removeAllListeners', | ||
'_internalOn', '_internalOnce', '_removeInternalListener', | ||
'_removeAllInternalListeners', 'emit', '_context', '_replotPending', | ||
'_hmpixcount', '_hmlumcount', '_mouseDownTime', '_legendMouseDownTime', | ||
'_removeAllInternalListeners', 'emit', '_context' | ||
]; | ||
|
||
var expectedUndefined = [ | ||
'data', 'layout', '_fullData', '_fullLayout', 'calcdata', 'framework', | ||
'empty', 'fid', 'undoqueue', 'undonum', 'autoplay', 'changed', | ||
'_promises', '_redrawTimer', 'firstscatter', 'hmlumcount', 'hmpixcount', | ||
'numboxes', '_transitionData', '_transitioning' | ||
'_promises', '_redrawTimer', 'firstscatter', 'numboxes', | ||
'_transitionData', '_transitioning', '_hmpixcount', '_hmlumcount', | ||
'_dragging', '_dragged', '_hoverdata', '_snapshotInProgress', '_editing', | ||
'_replotPending', '_mouseDownTime', '_legendMouseDownTime' | ||
]; | ||
|
||
Plots.purge(gd); | ||
|
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.
good catch!