8000 ZERO circular dependency by etpinard · Pull Request #2429 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

ZERO circular dependency #2429

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 17 commits into from
Mar 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
move Plotly.setPlotConfig to plot_api.js
  • Loading branch information
etpinard committed Mar 1, 2018
commit 381b6e402326395b228e6dbb97cedd66c1c6e8d1
3 changes: 1 addition & 2 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ require('./fonts/mathjax_config');
var Registry = require('./registry');
var register = exports.register = Registry.register;

exports.setPlotConfig = require('./plot_api/set_plot_config');
// expose plot api methods
var plotApi = require('./plot_api');
var methodNames = Object.keys(plotApi);
Expand Down Expand Up @@ -67,7 +66,7 @@ register([
exports.Icons = require('../build/ploticon');

// unofficial 'beta' plot methods, use at your own risk
exports.Plots = Plotly.Plots;
exports.Plots = require('./plots/plots');
exports.Fx = require('./components/fx');
exports.Snapshot = require('./snapshot');
exports.PlotSchema = require('./plot_api/plot_schema');
Expand Down
1 change: 1 addition & 0 deletions src/plot_api/index.js
10000
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ exports.purge = main.purge;
exports.addFrames = main.addFrames;
exports.deleteFrames = main.deleteFrames;
exports.animate = main.animate;
exports.setPlotConfig = main.setPlotConfig;

exports.toImage = require('./to_image');
exports.validate = require('./validate');
Expand Down
7 changes: 6 additions & 1 deletion src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var Color = require('../components/color');
var xmlnsNamespaces = require('../constants/xmlns_namespaces');
var svgTextUtils = require('../lib/svg_text_utils');

var defaultConfig = require('./plot_config');
var manageArrays = require('./manage_arrays');
var helpers = require('./helpers');
var subroutines = require('./subroutines');
Expand Down Expand Up @@ -447,6 +448,10 @@ exports.plot = function(gd, data, layout, config) {
});
};

exports.setPlotConfig = function setPlotConfig(obj) {
return Lib.extendFlat(defaultConfig, obj);
};

function setBackground(gd, bgColor) {
try {
gd._fullLayout._paper.style('background', bgColor);
Expand All @@ -461,7 +466,7 @@ function opaqueSetBackground(gd, bgColor) {
}

function setPlotContext(gd, config) {
if(!gd._context) gd._context = Lib.extendDeep({}, Plotly.defaultConfig);
if(!gd._context) gd._context = Lib.extendDeep({}, defaultConfig);
var context = gd._context;

var i, keys, key;
Expand Down
24 changes: 0 additions & 24 deletions src/plot_api/set_plot_config.js

This file was deleted.

0