We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3c3b3a commit a8fba03Copy full SHA for a8fba03
src/components/drawing/index.js
@@ -542,11 +542,11 @@ drawing.steps = function(shape) {
542
};
543
544
// off-screen svg render testing element, shared by the whole page
545
-// uses the id 'js-plotly-tester' and stores it in gd._tester
+// uses the id 'js-plotly-tester' and stores it in drawing.tester
546
// makes a hash of cached text items in tester.node()._cache
547
// so we can add references to rendered text (including all info
548
// needed to fully determine its bounding rect)
549
-drawing.makeTester = function(gd) {
+drawing.makeTester = function() {
550
var tester = d3.select('body')
551
.selectAll('#js-plotly-tester')
552
.data([0]);
@@ -579,7 +579,7 @@ drawing.makeTester = function(gd) {
579
tester.node()._cache = {};
580
}
581
582
- drawing.tester = gd._tester = tester;
+ drawing.tester = tester;
583
drawing.testref = testref;
584
585
src/components/sliders/draw.js
@@ -117,7 +117,7 @@ function keyFunction(opts) {
117
118
// Compute the dimensions (mutates sliderOpts):
119
function findDimensions(gd, sliderOpts) {
120
- var sliderLabels = gd._tester.selectAll('g.' + constants.labelGroupClass)
+ var sliderLabels = Drawing.tester.selectAll('g.' + constants.labelGroupClass)
121
.data(sliderOpts.steps);
122
123
sliderLabels.enter().append('g')
@@ -154,7 +154,7 @@ function findDimensions(gd, sliderOpts) {
154
155
if(sliderOpts.currentvalue.visible) {
156
// Get the dimensions of the current value label:
157
- var dummyGroup = gd._tester.append('g');
+ var dummyGroup = Drawing.tester.append('g');
158
159
sliderLabels.each(function(stepOpts) {
160
var curValPrefix = drawCurrentValue(dummyGroup, sliderOpts, stepOpts.label);
src/components/updatemenus/draw.js
@@ -504,7 +504,7 @@ function findDimensions(gd, menuOpts) {
504
menuOpts.lx = 0;
505
menuOpts.ly = 0;
506
507
- var fakeButtons = gd._tester.selectAll('g.' + constants.dropdownButtonClassName)
+ var fakeButtons = Drawing.tester.selectAll('g.' + constants.dropdownButtonClassName)
508
.data(menuOpts.buttons);
509
510
fakeButtons.enter().append('g')
src/plot_api/plot_api.js
@@ -93,9 +93,9 @@ Plotly.plot = function(gd, data, layout, config) {
93
d3.select(gd).classed('js-plotly-plot', true);
94
95
// off-screen getBoundingClientRect testing space,
96
- // in #js-plotly-tester (and stored as gd._tester)
+ // in #js-plotly-tester (and stored as Drawing.tester)
97
// so we can share cached text across tabs
98
- Drawing.makeTester(gd);
+ Drawing.makeTester();
99
100
// collect promises for any async actions during plotting
101
// any part of the plotting code can push to gd._promises, then
src/plots/plots.js
@@ -1173,7 +1173,6 @@ plots.purge = function(gd) {
1173
1174
// these get recreated on Plotly.plot anyway, but just to be safe
1175
// (and to have a record of them...)
1176
- delete gd._tester;
1177
delete gd._promises;
1178
delete gd._redrawTimer;
1179
delete gd.firstscatter;
src/traces/carpet/plot.js
@@ -59,8 +59,8 @@ function plotOne(gd, plotinfo, cd) {
59
drawGridLines(xa, ya, boundaryLayer, aax, 'a-boundary', aax._boundarylines);
60
drawGridLines(xa, ya, boundaryLayer, bax, 'b-boundary', bax._boundarylines);
61
62
- var maxAExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, aax._labels, 'a-label');
63
- var maxBExtent = drawAxisLabels(gd._tester, xa, ya, trace, t, labelLayer, bax._labels, 'b-label');
+ var maxAExtent = drawAxisLabels(Drawing.tester, xa, ya, trace, t, labelLayer, aax._labels, 'a-label');
+ var maxBExtent = drawAxisLabels(Drawing.tester, xa, ya, trace, t, labelLayer, bax._labels, 'b-label');
64
65
drawAxisTitles(labelLayer, trace, t, xa, ya, maxAExtent, maxBExtent);
66
test/jasmine/tests/plots_test.js
@@ -428,7 +428,6 @@ describe('Test Plots', function() {
428
expect(gd.undonum).toBeUndefined();
429
expect(gd.autoplay).toBeUndefined();
430
expect(gd.changed).toBeUndefined();
431
- expect(gd._tester).toBeUndefined();
432
expect(gd._promises).toBeUndefined();
433
expect(gd._redrawTimer).toBeUndefined();
434
expect(gd.firstscatter).toBeUndefined();
0 commit comments