Skip to content

Commit 2ef7d47

Browse files
committed
Remove show edit in chart studio button
1 parent 117a8c2 commit 2ef7d47

5 files changed

Lines changed: 6 additions & 40 deletions

File tree

src/components/modebar/buttons.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ modeBarButtons.sendDataToCloud = {
7676
}
7777
};
7878

79-
modeBarButtons.editInChartStudio = {
80-
name: 'editInChartStudio',
81-
title: function(gd) { return _(gd, 'Edit in Chart Studio'); },
82-
icon: Icons.pencil,
83-
click: function(gd) {
84-
Plots.sendDataToCloud(gd);
85-
}
86-
};
87-
8879
modeBarButtons.zoom2d = {
8980
name: 'zoom2d',
9081
_cat: 'zoom',

src/components/modebar/manage.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ function getButtonGroups(gd) {
145145

146146
// buttons common to all plot types
147147
var commonGroup = ['toImage'];
148-
if(context.showEditInChartStudio) commonGroup.push('editInChartStudio');
149-
else if(context.showSendToCloud) commonGroup.push('sendDataToCloud');
148+
if(context.showSendToCloud) commonGroup.push('sendDataToCloud');
150149
addGroup(commonGroup);
151150

152151
var zoomGroup = [];

src/plot_api/plot_config.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var configAttributes = {
3636
dflt: '',
3737
description: [
3838
'When set it determines base URL for',
39-
'the \'Edit in Chart Studio\' `showEditInChartStudio`/`showSendToCloud` mode bar button.',
39+
'the \'Edit in Chart Studio\' `showSendToCloud` mode bar button.',
4040
'To enable sending your data to Chart Studio Cloud, you need to',
4141
'set both `plotlyServerURL` to \'https://chart-studio.plotly.com\' and',
4242
'also set `showSendToCloud` to true.'
@@ -251,15 +251,6 @@ var configAttributes = {
251251
'until you arrive at the Chart Studio and explicitly click "Save".'
252252
].join(' ')
253253
},
254-
showEditInChartStudio: {
255-
valType: 'boolean',
256-
dflt: false,
257-
description: [
258-
'Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.',
259-
'Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,',
260-
'only `showEditInChartStudio` will be honored.'
261-
].join(' ')
262-
},
263254
modeBarButtonsToRemove: {
264255
valType: 'any',
265256
dflt: [],

test/jasmine/tests/modebar_test.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('ModeBar', function() {
5454
_context: {
5555
displaylogo: true,
5656
showSendToCloud: false,
57-
showEditInChartStudio: false,
5857
displayModeBar: true,
5958
modeBarButtonsToRemove: [],
6059
modeBarButtonsToAdd: [],
@@ -810,7 +809,7 @@ describe('ModeBar', function() {
810809
expect(countLogo(gd._fullLayout._modeBar)).toEqual(0);
811810
});
812811

813-
it('displays/hides cloud link according to showSendToCloud and/or showEditInChartStudio config arg', function() {
812+
it('displays/hides cloud link according to showSendToCloud config arg', function() {
814813
var gd = getMockGraphInfo();
815814
gd._fullLayout._basePlotModules = [{ name: 'pie' }];
816815
gd._fullData = [{type: 'pie'}];
@@ -820,24 +819,15 @@ describe('ModeBar', function() {
820819
]), 1);
821820

822821
gd._context.showSendToCloud = true;
823-
gd._context.showEditInChartStudio = false;
824822
manageModeBar(gd);
825823
checkButtons(gd._fullLayout._modeBar, getButtons([
826824
['toImage', 'sendDataToCloud']
827825
]), 1);
828826

829827
gd._context.showSendToCloud = false;
830-
gd._context.showEditInChartStudio = true;
831828
manageModeBar(gd);
832829
checkButtons(gd._fullLayout._modeBar, getButtons([
833-
['toImage', 'editInChartStudio']
834-
]), 1);
835-
836-
gd._context.showSendToCloud = true;
837-
gd._context.showEditInChartStudio = true;
838-
manageModeBar(gd);
839-
checkButtons(gd._fullLayout._modeBar, getButtons([
840-
['toImage', 'editInChartStudio']
830+
['toImage']
841831
]), 1);
842832
});
843833

test/plot-schema.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
"valType": "number"
274274
},
275275
"plotlyServerURL": {
276-
"description": "When set it determines base URL for the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button. To enable sending your data to Chart Studio Cloud, you need to set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and also set `showSendToCloud` to true.",
276+
"description": "When set it determines base URL for the 'Edit in Chart Studio' `showSendToCloud` mode bar button. To enable sending your data to Chart Studio Cloud, you need to set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and also set `showSendToCloud` to true.",
277277
"dflt": "",
278278
"valType": "string"
279279
},
@@ -319,11 +319,6 @@
319319
"dflt": true,
320320
"valType": "boolean"
321321
},
322-
"showEditInChartStudio": {
323-
"description": "Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk. Note that if both `showSendToCloud` and `showEditInChartStudio` are turned, only `showEditInChartStudio` will be honored.",
324-
"dflt": false,
325-
"valType": "boolean"
326-
},
327322
"showSendToCloud": {
328323
"description": "Should we include a ModeBar button, labeled \"Edit in Chart Studio\", that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0 this button was included by default, now it is opt-in using this flag. Note that this button can (depending on `plotlyServerURL` being set) send your data to an external server. However that server does not persist your data until you arrive at the Chart Studio and explicitly click \"Save\".",
329324
"dflt": false,
@@ -4618,7 +4613,7 @@
46184613
},
46194614
"remove": {
46204615
"arrayOk": true,
4621-
"description": "Determines which predefined modebar buttons to remove. Similar to `config.modeBarButtonsToRemove` option. This may include *autoScale2d*, *autoscale*, *editInChartStudio*, *editinchartstudio*, *hoverCompareCartesian*, *hovercompare*, *lasso*, *lasso2d*, *orbitRotation*, *orbitrotation*, *pan*, *pan2d*, *pan3d*, *reset*, *resetCameraDefault3d*, *resetCameraLastSave3d*, *resetGeo*, *resetSankeyGroup*, *resetScale2d*, *resetViewMap*, *resetViewMapbox*, *resetViews*, *resetcameradefault*, *resetcameralastsave*, *resetsankeygroup*, *resetscale*, *resetview*, *resetviews*, *select*, *select2d*, *sendDataToCloud*, *senddatatocloud*, *tableRotation*, *tablerotation*, *toImage*, *toggleHover*, *toggleSpikelines*, *togglehover*, *togglespikelines*, *toimage*, *zoom*, *zoom2d*, *zoom3d*, *zoomIn2d*, *zoomInGeo*, *zoomInMap*, *zoomInMapbox*, *zoomOut2d*, *zoomOutGeo*, *zoomOutMap*, *zoomOutMapbox*, *zoomin*, *zoomout*.",
4616+
"description": "Determines which predefined modebar buttons to remove. Similar to `config.modeBarButtonsToRemove` option. This may include *autoScale2d*, *autoscale*, *hoverCompareCartesian*, *hovercompare*, *lasso*, *lasso2d*, *orbitRotation*, *orbitrotation*, *pan*, *pan2d*, *pan3d*, *reset*, *resetCameraDefault3d*, *resetCameraLastSave3d*, *resetGeo*, *resetSankeyGroup*, *resetScale2d*, *resetViewMap*, *resetViewMapbox*, *resetViews*, *resetcameradefault*, *resetcameralastsave*, *resetsankeygroup*, *resetscale*, *resetview*, *resetviews*, *select*, *select2d*, *sendDataToCloud*, *senddatatocloud*, *tableRotation*, *tablerotation*, *toImage*, *toggleHover*, *toggleSpikelines*, *togglehover*, *togglespikelines*, *toimage*, *zoom*, *zoom2d*, *zoom3d*, *zoomIn2d*, *zoomInGeo*, *zoomInMap*, *zoomInMapbox*, *zoomOut2d*, *zoomOutGeo*, *zoomOutMap*, *zoomOutMapbox*, *zoomin*, *zoomout*.",
46224617
"dflt": "",
46234618
"editType": "modebar",
46244619
"valType": "string"

0 commit comments

Comments
 (0)