Skip to content

Commit 928949d

Browse files
committed
rename plotlyServerUrl -> plotlyServerURL
... to match topojsonURL config option
1 parent 79f93b9 commit 928949d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/plot_api/plot_config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ module.exports = {
2121
// no interactivity, for export or image generation
2222
staticPlot: false,
2323

24-
// base url for the 'Edit in Chart Studio' (aka sendDataToCloud) mode bar button
24+
// base URL for the 'Edit in Chart Studio' (aka sendDataToCloud) mode bar button
2525
// and the showLink/sendData on-graph link
26-
plotlyServerUrl: 'https://plot.ly',
26+
plotlyServerURL: 'https://plot.ly',
2727

2828
/*
2929
* we can edit titles, move annotations, etc - sets all pieces of `edits`

src/plots/plots.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function positionPlayWithData(gd, container) {
214214
plots.sendDataToCloud = function(gd) {
215215
gd.emit('plotly_beforeexport');
216216

217-
var baseUrl = (window.PLOTLYENV || {}).BASE_URL || gd._context.plotlyServerUrl;
217+
var baseUrl = (window.PLOTLYENV || {}).BASE_URL || gd._context.plotlyServerURL;
218218

219219
var hiddenformDiv = d3.select(gd)
220220
.append('div')

test/jasmine/tests/config_test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ describe('config argument', function() {
472472
});
473473
});
474474

475-
describe('plotlyServerUrl:', function() {
475+
describe('plotlyServerURL:', function() {
476476
var gd;
477477
var form;
478478

@@ -488,7 +488,7 @@ describe('config argument', function() {
488488
it('should default to plotly cloud', function(done) {
489489
Plotly.plot(gd, [], {})
490490
.then(function() {
491-
expect(gd._context.plotlyServerUrl).toBe('https://plot.ly');
491+
expect(gd._context.plotlyServerURL).toBe('https://plot.ly');
492492

493493
Plotly.Plots.sendDataToCloud(gd);
494494
expect(form.action).toBe('https://plot.ly/external');
@@ -499,9 +499,9 @@ describe('config argument', function() {
499499
});
500500

501501
it('can be set to other base urls', function(done) {
502-
Plotly.plot(gd, [], {}, {plotlyServerUrl: 'dummy'})
502+
Plotly.plot(gd, [], {}, {plotlyServerURL: 'dummy'})
503503
.then(function() {
504-
expect(gd._context.plotlyServerUrl).toBe('dummy');
504+
expect(gd._context.plotlyServerURL).toBe('dummy');
505505

506506
Plotly.Plots.sendDataToCloud(gd);
507507
expect(form.action).toContain('/dummy/external');
@@ -514,9 +514,9 @@ describe('config argument', function() {
514514
it('has lesser priotiy then window env', function(done) {
515515
window.PLOTLYENV = {BASE_URL: 'yo'};
516516

517-
Plotly.plot(gd, [], {}, {plotlyServerUrl: 'dummy'})
517+
Plotly.plot(gd, [], {}, {plotlyServerURL: 'dummy'})
518518
.then(function() {
519-
expect(gd._context.plotlyServerUrl).toBe('dummy');
519+
expect(gd._context.plotlyServerURL).toBe('dummy');
520520

521521
Plotly.Plots.sendDataToCloud(gd);
522522
expect(form.action).toContain('/yo/external');

0 commit comments

Comments
 (0)