Skip to content

Commit 02263b9

Browse files
committed
use redrawReglTraces in edit subroutines
1 parent c02330c commit 02263b9

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

src/plot_api/subroutines.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -462,21 +462,21 @@ exports.drawMainTitle = function(gd) {
462462
});
463463
};
464464

465-
// First, see if we need to do arraysToCalcdata
466-
// call it regardless of what change we made, in case
467-
// supplyDefaults brought in an array that was already
468-
// in gd.data but not in gd._fullData previously
469465
exports.doTraceStyle = function(gd) {
470-
var fullLayout = gd._fullLayout;
466+
var calcdata = gd.calcdata;
471467
var editStyleCalls = [];
472468
var i;
473469

474-
for(i = 0; i < gd.calcdata.length; i++) {
475-
var cd = gd.calcdata[i];
470+
for(i = 0; i < calcdata.length; i++) {
471+
var cd = calcdata[i];
476472
var cd0 = cd[0] || {};
477473
var trace = cd0.trace || {};
478474
var _module = trace._module || {};
479475

476+
// See if we need to do arraysToCalcdata
477+
// call it regardless of what change we made, in case
478+
// supplyDefaults brought in an array that was already
479+
// in gd.data but not in gd._fullData previously
480480
var arraysToCalcdata = _module.arraysToCalcdata;
481481
if(arraysToCalcdata) arraysToCalcdata(cd, trace);
482482

@@ -485,16 +485,12 @@ exports.doTraceStyle = function(gd) {
485485
}
486486

487487
if(editStyleCalls.length) {
488-
clearGlCanvases(gd);
489-
490-
if(fullLayout._hasOnlyLargeSploms) {
491-
fullLayout._splomGrid.draw();
492-
}
493-
494488
for(i = 0; i < editStyleCalls.length; i++) {
495489
var edit = editStyleCalls[i];
496490
edit.fn(gd, edit.cd0);
497491
}
492+
clearGlCanvases(gd);
493+
exports.redrawReglTraces(gd);
498494
}
499495

500496
Plots.style(gd);
@@ -546,8 +542,9 @@ exports.doTicksRelayout = function(gd) {
546542
Axes.doTicks(gd, 'redraw');
547543

548544
if(gd._fullLayout._hasOnlyLargeSploms) {
545+
Registry.subplotsRegistry.splom.updateGrid(gd);
549546
clearGlCanvases(gd);
550-
Registry.subplotsRegistry.splom.plot(gd);
547+
exports.redrawReglTraces(gd);
551548
}
552549

553550
exports.drawMainTitle(gd);

src/traces/splom/base_plot.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ module.exports = {
234234
drawFramework: Cartesian.drawFramework,
235235
plot: plot,
236236
drag: drag,
237+
updateGrid: updateGrid,
237238
clean: clean,
238239
updateFx: updateFx,
239240
toSVG: Cartesian.toSVG

src/traces/splom/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,6 @@ function editStyle(gd, cd0) {
318318

319319
// TODO this is too long for arrayOk attributes!
320320
scene.matrix.update(opts, null);
321-
322-
scene.draw();
323321
}
324322

325323
function hoverPoints(pointData, xval, yval) {

0 commit comments

Comments
 (0)