8000 Add redrawReglTraces subroutine by etpinard · Pull Request #3067 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Add redrawReglTraces subroutine #3067

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

Merged
merged 7 commits into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use redrawReglTraces in edit subroutines
  • Loading branch information
etpinard committed Oct 2, 2018
commit 02263b9683305088f2377c26f72b6ad54384b8ad
25 changes: 11 additions & 14 deletions src/plot_api/subroutines.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,21 +462,21 @@ exports.drawMainTitle = function(gd) {
});
};

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

for(i = 0; i < gd.calcdata.length; i++) {
var cd = gd.calcdata[i];
for(i = 0; i < calcdata.length; i++) {
var cd = calcdata[i];
var cd0 = cd[0] || {};
var trace = cd0.trace || {};
var _module = trace._module || {};

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

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

if(editStyleCalls.length) {
clearGlCanvases(gd);

if(fullLayout._hasOnlyLargeSploms) {
fullLayout._splomGrid.draw();
}

for(i = 0; i < editStyleCalls.length; i++) {
var edit = editStyleCalls[i];
edit.fn(gd, edit.cd0);
}
clearGlCanvases(gd);
exports.redrawReglTraces(gd);
}

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

if(gd._fullLayout._hasOnlyLargeSploms) {
Registry.subplotsRegistry.splom.updateGrid(gd);
clearGlCanvases(gd);
Registry.subplotsRegistry.splom.plot(gd);
exports.redrawReglTraces(gd);
}

exports.drawMainTitle(gd);
Expand Down
1 change: 1 addition & 0 deletions src/traces/splom/base_plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ module.exports = {
drawFramework: Cartesian.drawFramework,
plot: plot,
drag: drag,
updateGrid: updateGrid,
clean: clean,
updateFx: updateFx,
toSVG: Cartesian.toSVG
Expand Down
2 changes: 0 additions & 2 deletions src/traces/splom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@ function editStyle(gd, cd0) {

// TODO this is too long for arrayOk attributes!
scene.matrix.update(opts, null);

scene.draw();
}

function hoverPoints(pointData, xval, yval) {
Expand Down
0