@@ -43,7 +43,8 @@ var rules = {
43
43
"X [data-title]:hover:before,X [data-title]:hover:after": "display:block;opacity:1;",
44
44
"X [data-title]:before": "content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;",
45
45
"X [data-title]:after": "content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;",
46
- Y: "position:fixed;top:50px;right:20px;z-index:10000;",
46
+ Y: "font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
47
+ "Y p": "margin:0;",
47
48
"Y .notifier-note": "min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;",
48
49
"Y .notifier-close": "color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;",
49
50
"Y .notifier-close:hover": "color:#444;text-decoration:none;cursor:pointer;"
@@ -123,6 +124,10 @@ module.exports = {
123
124
'movie': {
124
125
'width': 1000,
125
126
'path': 'm938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z'
127
+ },
128
+ 'disk': {
129
+ 'width': 857.1,
130
+ 'path': 'm214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z'
126
131
}
127
132
};
128
133
},{}],3:[function(require,module,exports){
@@ -53590,6 +53595,11 @@ proto.toImage = function() {
53590
53595
});
53591
53596
};
53592
53597
53598
+ proto.sendDataToCloud = function() {
53599
+ var gd = this.graphInfo;
53600
+ Plotly.Plots.sendDataToCloud(gd)
53601
+ };
53602
+
53593
53603
/**
53594
53604
*
53595
53605
* @Property config specification hash of button parameters
@@ -53659,6 +53669,11 @@ proto.config = function config() {
53659
53669
icon: 'camera',
53660
53670
click: this.toImage
53661
53671
},
53672
+ sendDataToCloud: {
53673
+ title: 'save and edit plot in cloud',
53674
+ icon: 'disk',
53675
+ click: this.sendDataToCloud
53676
+ },
53662
53677
// gl3d
53663
53678
zoom3d: {
53664
53679
title: 'Zoom',
@@ -60761,7 +60776,7 @@ module.exports = {
60761
60776
showTips: true,
60762
60777
60763
60778
// link to open this plot in plotly
60764
- showLink: true ,
60779
+ showLink: false ,
60765
60780
60766
60781
// if we show a link, does it contain data or just link to a plotly file?
60767
60782
sendData: true,
@@ -65319,15 +65334,15 @@ fx.modeBar = function(gd){
65319
65334
function chooseModebarButtons(fullLayout) {
65320
65335
if(fullLayout._hasGL3D) {
65321
65336
return [
65322
- ['toImage'],
65337
+ ['toImage', 'sendDataToCloud' ],
65323
65338
['orbitRotation', 'tableRotation', 'zoom3d', 'pan3d'],
65324
65339
['resetCameraDefault3d', 'resetCameraLastSave3d'],
65325
65340
['hoverClosest3d']
65326
65341
];
65327
65342
}
65328
65343
else if(fullLayout._hasGeo) {
65329
65344
return [
65330
- ['toImage'],
65345
+ ['toImage', 'sendDataToCloud' ],
65331
65346
['zoomInGeo', 'zoomOutGeo', 'resetGeo'],
65332
65347
['hoverClosestGeo']
65333
65348
];
@@ -65345,9 +65360,9 @@ function chooseModebarButtons(fullLayout) {
65345
65360
}
65346
65361
}
65347
65362
65348
- if(allFixed) buttons = [['toImage']];
65363
+ if(allFixed) buttons = [['toImage', 'sendDataToCloud' ]];
65349
65364
else buttons = [
65350
- ['toImage'],
65365
+ ['toImage', 'sendDataToCloud' ],
65351
65366
['zoom2d', 'pan2d'],
65352
65367
['zoomIn2d', 'zoomOut2d', 'resetScale2d', 'autoScale2d']
65353
65368
];
@@ -71686,37 +71701,8 @@ function positionPlayWithData(gd, container){
71686
71701
.text(gd._context.linkText + ' ' + String.fromCharCode(187));
71687
71702
71688
71703
if(gd._context.sendData) {
71689
- link.on('click',function(){
71690
- gd.emit('plotly_beforeexport');
71691
-
71692
- var baseUrl = (window.PLOTLYENV && window.PLOTLYENV.BASE_URL) || 'https://plot.ly';
71693
-
71694
- var hiddenformDiv = d3.select(gd)
71695
- .append('div')
71696
- .attr('id', 'hiddenform')
71697
- .style('display', 'none');
71698
-
71699
- var hiddenform = hiddenformDiv
71700
- .append('form')
71701
- .attr({
71702
- action: baseUrl + '/external',
71703
- method: 'post',
71704
- target: '_blank'
71705
- });
71706
-
71707
- var hiddenformInput = hiddenform
71708
- .append('input')
71709
- .attr({
71710
- type: 'text',
71711
- name: 'data'
71712
- });
71713
-
71714
- hiddenformInput.node().value = plots.graphJson(gd, false, 'keepdata');
71715
- hiddenform.node().submit();
71716
- hiddenformDiv.remove();
71717
-
71718
- gd.emit('plotly_afterexport');
71719
- return false;
71704
+ link.on('click', function() {
71705
+ plots.sendDataToCloud(gd)
71720
71706
});
71721
71707
}
71722
71708
else {
@@ -71728,6 +71714,38 @@ function positionPlayWithData(gd, container){
71728
71714
});
71729
71715
}
71730
71716
}
71717
+ plots.sendDataToCloud = function(gd) {
71718
+ gd.emit('plotly_beforeexport');
71719
+
71720
+ var baseUrl = (window.PLOTLYENV && window.PLOTLYENV.BASE_URL) || 'https://plot.ly';
71721
+
71722
+ var hiddenformDiv = d3.select(gd)
71723
+ .append('div')
71724
+ .attr('id', 'hiddenform')
71725
+ .style('display', 'none');
71726
+
71727
+ var hiddenform = hiddenformDiv
71728
+ .append('form')
71729
+ .attr({
71730
+ action: baseUrl + '/external',
71731
+ method: 'post',
71732
+ target: '_blank'
71733
+ });
71734
+
71735
+ var hiddenformInput = hiddenform
71736
+ .append('input')
71737
+ .attr({
71738
+ type: 'text',
71739
+ name: 'data'
71740
+ });
71741
+
71742
+ hiddenformInput.node().value = plots.graphJson(gd, false, 'keepdata');
71743
+ hiddenform.node().submit();
71744
+ hiddenformDiv.remove();
71745
+
71746
+ gd.emit('plotly_afterexport');
71747
+ return false;
71748
+ }
71731
71749
71732
71750
plots.supplyDefaults = function(gd) {
71733
71751
// fill in default values:
0 commit comments