Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2734,12 +2734,8 @@ Plotly.purge = function purge(gd) {
// remove plot container
if(fullLayout._container) fullLayout._container.remove();

// in contrast to Plotly.Plots.purge which does NOT clear _context!
delete gd._context;
delete gd._replotPending;
delete gd._mouseDownTime;
delete gd._legendMouseDownTime;
delete gd._hmpixcount;
delete gd._hmlumcount;

return gd;
};
Expand Down
15 changes: 13 additions & 2 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1341,14 +1341,25 @@ plots.purge = function(gd) {
delete gd._promises;
delete gd._redrawTimer;
delete gd.firstscatter;
delete gd.hmlumcount;
delete gd.hmpixcount;
delete gd._hmlumcount;
delete gd._hmpixcount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

delete gd.numboxes;
delete gd._transitionData;
delete gd._transitioning;
delete gd._initialAutoSize;
delete gd._transitioningWithDuration;

// created during certain events, that *should* clean them up
// themselves, but may not if there was an error
delete gd._dragging;
delete gd._dragged;
delete gd._hoverdata;
delete gd._snapshotInProgress;
delete gd._editing;
delete gd._replotPending;
delete gd._mouseDownTime;
delete gd._legendMouseDownTime;

// remove all event listeners
if(gd.removeAllListeners) gd.removeAllListeners();
};
Expand Down
13 changes: 12 additions & 1 deletion src/traces/scatter/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,16 @@
'use strict';

module.exports = {
PTS_LINESONLY: 20
PTS_LINESONLY: 20,

// fixed parameters of clustering and clipping algorithms

// fraction of clustering tolerance "so close we don't even consider it a new point"
minTolerance: 0.2,
// how fast does clustering tolerance increase as you get away from the visible region
toleranceGrowth: 10,

// number of viewport sizes away from the visible region
// at which we clip all lines to the perimeter
maxScreensAway: 20
};
Loading