8000 Splom zoom perf by etpinard · Pull Request #2527 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Splom zoom perf #2527

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 14 commits into from
Apr 11, 2018
Merged
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
lint in plot_api
  • Loading branch information
etpinard committed Apr 5, 2018
commit ebb35ce657b484af2dfaddc92018bb1029d8fb37
25 changes: 13 additions & 12 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var helpers = require('./helpers');
var subroutines = require('./subroutines');
var editTypes = require('./edit_types');

var cartesianConstants = require('../plots/cartesian/constants');
var AX_NAME_PATTERN = require('../plots/cartesian/constants').AX_NAME_PATTERN;

var numericNameWarningCount = 0;
var numericNameWarningCountLimit = 5;
Expand Down Expand Up @@ -1296,8 +1296,8 @@ exports.restyle = function restyle(gd, astr, val, _traces) {

var traces = helpers.coerceTraceIndices(gd, _traces);

var specs = _restyle(gd, aobj, traces),
flags = specs.flags;
var specs = _restyle(gd, aobj, traces);
var flags = specs.flags;

// clear calcdata and/or axis types if required so they get regenerated
if(flags.clearCalc) gd.calcdata = undefined;
Expand Down Expand Up @@ -1661,8 +1661,8 @@ exports.relayout = function relayout(gd, astr, val) {

if(Object.keys(aobj).length) gd.changed = true;

var specs = _relayout(gd, aobj),
flags = specs.flags;
var specs = _relayout(gd, aobj);
var flags = specs.flags;

// clear calcdata if required
if(flags.calc) gd.calcdata = undefined;
Expand Down Expand Up @@ -1923,7 +1923,7 @@ function _relayout(gd, aobj) {
}
Lib.nestedProperty(fullLayout, ptrunk + '._inputRange').set(null);
}
else if(pleaf.match(cartesianConstants.AX_NAME_PATTERN)) {
else if(pleaf.match(AX_NAME_PATTERN)) {
var fullProp = Lib.nestedProperty(fullLayout, ai).get(),
newType = (vi || {}).type;

Expand Down Expand Up @@ -1976,8 +1976,9 @@ function _relayout(gd, aobj) {
if(checkForAutorange && (refAutorange(gd, objToAutorange, 'x') || refAutorange(gd, objToAutorange, 'y'))) {
flags.calc = true;
}
else editTypes.update(flags, updateValObject);

else {
editTypes.update(flags, updateValObject);
}

// prepare the edits object we'll send to applyContainerArrayChanges
if(!arrayEdits[arrayStr]) arrayEdits[arrayStr] = {};
Expand Down Expand Up @@ -2128,11 +2129,11 @@ exports.update = function update(gd, traceUpdate, layoutUpdate, _traces) {

var traces = helpers.coerceTraceIndices(gd, _traces);

var restyleSpecs = _restyle(gd, Lib.extendFlat({}, traceUpdate), traces),
restyleFlags = restyleSpecs.flags;
var restyleSpecs = _restyle(gd, Lib.extendFlat({}, traceUpdate), traces);
var restyleFlags = restyleSpecs.flags;

var relayoutSpecs = _relayout(gd, Lib.extendFlat({}, layoutUpdate)),
relayoutFlags = relayoutSpecs.flags;
var relayoutSpecs = _relayout(gd, Lib.extendFlat({}, layoutUpdate));
var relayoutFlags = relayoutSpecs.flags;

// clear calcdata and/or axis types if required
if(restyleFlags.clearCalc || relayoutFlags.calc) gd.calcdata = undefined;
Expand Down
0