Skip to content

Commit c802d79

Browse files
committed
non-attribute modifications to _fullData should be _private, in carpet & table
1 parent 28d073f commit c802d79

File tree

8 files changed

+20
-18
lines changed

8 files changed

+20
-18
lines changed

src/traces/carpet/calc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ module.exports = function calc(gd, trace) {
5252
trace.setScale();
5353

5454
// Convert cartesian-space x/y coordinates to screen space pixel coordinates:
55-
t.xp = trace.xp = map2dArray(trace.xp, x, xa.c2p);
56-
t.yp = trace.yp = map2dArray(trace.yp, y, ya.c2p);
55+
t.xp = trace._xp = map2dArray(trace._xp, x, xa.c2p);
56+
t.yp = trace._yp = map2dArray(trace._yp, y, ya.c2p);
5757

5858
// This is a rather expensive scan. Nothing guarantees monotonicity,
5959
// so we need to scan through all data to get proper ranges:
@@ -88,7 +88,7 @@ module.exports = function calc(gd, trace) {
8888

8989
// Tabulate points for the four segments that bound the axes so that we can
9090
// map to pixel coordinates in the plot function and create a clip rect:
91-
t.clipsegments = calcClipPath(trace.xctrl, trace.yctrl, aax, bax);
91+
t.clipsegments = calcClipPath(trace._xctrl, trace._yctrl, aax, bax);
9292

9393
t.x = x;
9494
t.y = y;

src/traces/carpet/calc_gridlines.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ module.exports = function calcGridlines(trace, cd, axisLetter, crossAxisLetter)
3030
axis.tickvals = data.slice();
3131
}
3232

33-
var xcp = trace.xctrl;
34-
var ycp = trace.yctrl;
33+
var xcp = trace._xctrl;
34+
var ycp = trace._yctrl;
3535
var nea = xcp[0].length;
3636
var neb = xcp.length;
3737
var na = trace.a.length;

src/traces/carpet/set_convert.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ module.exports = function setConvert(trace) {
7272
// an expanded basis of control points. Note in particular that it overwrites the existing
7373
// basis without creating a new array since that would potentially thrash the garbage
7474
// collector.
75-
var result = computeControlPoints(trace.xctrl, trace.yctrl, x, y, aax.smoothing, bax.smoothing);
76-
trace.xctrl = result[0];
77-
trace.yctrl = result[1];
75+
var result = computeControlPoints(trace._xctrl, trace._yctrl, x, y, aax.smoothing, bax.smoothing);
76+
trace._xctrl = result[0];
77+
trace._yctrl = result[1];
7878

7979
// This step is the second step in the process, but it's somewhat simpler. It just unrolls
8080
// some logic since it would be unnecessarily expensive to compute both interpolations
8181
// nearly identically but separately and to include a bunch of linear vs. bicubic logic in
8282
// every single call.
83-
trace.evalxy = createSplineEvaluator([trace.xctrl, trace.yctrl], na, nb, aax.smoothing, bax.smoothing);
83+
trace.evalxy = createSplineEvaluator([trace._xctrl, trace._yctrl], na, nb, aax.smoothing, bax.smoothing);
8484

85-
trace.dxydi = createIDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing);
86-
trace.dxydj = createJDerivativeEvaluator([trace.xctrl, trace.yctrl], aax.smoothing, bax.smoothing);
85+
trace.dxydi = createIDerivativeEvaluator([trace._xctrl, trace._yctrl], aax.smoothing, bax.smoothing);
86+
trace.dxydj = createJDerivativeEvaluator([trace._xctrl, trace._yctrl], aax.smoothing, bax.smoothing);
8787
};
8888

8989
/*

src/traces/contour/empty_pathinfo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = function emptyPathinfo(contours, plotinfo, cd0) {
2121
var pathinfo = [];
2222
var end = endPlus(contoursFinal);
2323

24-
var carpet = cd0.trace.carpetTrace;
24+
var carpet = cd0.trace._carpetTrace;
2525

2626
var basePathinfo = carpet ? {
2727
// store axes so we can convert to px

src/traces/contourcarpet/calc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var setContours = require('../contour/set_contours');
2424
// though a few things inside heatmap calc still look for
2525
// contour maps, because the makeBoundArray calls are too entangled
2626
module.exports = function calc(gd, trace) {
27-
var carpet = trace.carpetTrace = lookupCarpet(gd, trace);
27+
var carpet = trace._carpetTrace = lookupCarpet(gd, trace);
2828
if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return;
2929

3030
if(!trace.a || !trace.b) {
@@ -54,7 +54,7 @@ module.exports = function calc(gd, trace) {
5454
function heatmappishCalc(gd, trace) {
5555
// prepare the raw data
5656
// run makeCalcdata on x and y even for heatmaps, in case of category mappings
57-
var carpet = trace.carpetTrace;
57+
var carpet = trace._carpetTrace;
5858
var aax = carpet.aaxis;
5959
var bax = carpet.baxis;
6060
var a,

src/traces/contourcarpet/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = function plot(gd, plotinfo, cdcontours) {
3535
function plotOne(gd, plotinfo, cd) {
3636
var trace = cd[0].trace;
3737

38-
var carpet = trace.carpetTrace = lookupCarpet(gd, trace);
38+
var carpet = trace._carpetTrace = lookupCarpet(gd, trace);
3939
var carpetcd = gd.calcdata[carpet.index][0];
4040

4141
if(!carpet.visible || carpet.visible === 'legendonly') return;

src/traces/scattercarpet/calc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var calcMarkerSize = require('../scatter/calc').calcMarkerSize;
1818
var lookupCarpet = require('../carpet/lookup_carpetid');
1919

2020
module.exports = function calc(gd, trace) {
21-
var carpet = trace.carpetTrace = lookupCarpet(gd, trace);
21+
var carpet = trace._carpetTrace = lookupCarpet(gd, trace);
2222
if(!carpet || !carpet.visible || carpet.visible === 'legendonly') return;
2323
var i;
2424

src/traces/table/calc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
var wrap = require('../../lib/gup').wrap;
1212

13-
module.exports = function calc(gd, trace) {
14-
return wrap(trace);
13+
module.exports = function calc() {
14+
// we don't actually need to include the trace here, since that will be added
15+
// by Plots.doCalcdata, and that's all we actually need later.
16+
return wrap({});
1517
};

0 commit comments

Comments
 (0)