Skip to content

Commit ae11cc0

Browse files
committed
new dist
1 parent b0a9396 commit ae11cc0

File tree

3 files changed

+129
-93
lines changed

3 files changed

+129
-93
lines changed

dist/plotly-with-meta.js

+55-37
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ var rules = {
4343
"X [data-title]:hover:before,X [data-title]:hover:after": "display:block;opacity:1;",
4444
"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;",
4545
"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;",
4748
"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;",
4849
"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;",
4950
"Y .notifier-close:hover": "color:#444;text-decoration:none;cursor:pointer;"
@@ -123,6 +124,10 @@ module.exports = {
123124
'movie': {
124125
'width': 1000,
125126
'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'
126131
}
127132
};
128133
},{}],3:[function(require,module,exports){
@@ -53590,6 +53595,11 @@ proto.toImage = function() {
5359053595
});
5359153596
};
5359253597

53598+
proto.sendDataToCloud = function() {
53599+
var gd = this.graphInfo;
53600+
Plotly.Plots.sendDataToCloud(gd)
53601+
};
53602+
5359353603
/**
5359453604
*
5359553605
* @Property config specification hash of button parameters
@@ -53659,6 +53669,11 @@ proto.config = function config() {
5365953669
icon: 'camera',
5366053670
click: this.toImage
5366153671
},
53672+
sendDataToCloud: {
53673+
title: 'save and edit plot in cloud',
53674+
icon: 'disk',
53675+
click: this.sendDataToCloud
53676+
},
5366253677
// gl3d
5366353678
zoom3d: {
5366453679
title: 'Zoom',
@@ -60761,7 +60776,7 @@ module.exports = {
6076160776
showTips: true,
6076260777

6076360778
// link to open this plot in plotly
60764-
showLink: true,
60779+
showLink: false,
6076560780

6076660781
// if we show a link, does it contain data or just link to a plotly file?
6076760782
sendData: true,
@@ -65319,15 +65334,15 @@ fx.modeBar = function(gd){
6531965334
function chooseModebarButtons(fullLayout) {
6532065335
if(fullLayout._hasGL3D) {
6532165336
return [
65322-
['toImage'],
65337+
['toImage', 'sendDataToCloud'],
6532365338
['orbitRotation', 'tableRotation', 'zoom3d', 'pan3d'],
6532465339
['resetCameraDefault3d', 'resetCameraLastSave3d'],
6532565340
['hoverClosest3d']
6532665341
];
6532765342
}
6532865343
else if(fullLayout._hasGeo) {
6532965344
return [
65330-
['toImage'],
65345+
['toImage', 'sendDataToCloud'],
6533165346
['zoomInGeo', 'zoomOutGeo', 'resetGeo'],
6533265347
['hoverClosestGeo']
6533365348
];
@@ -65345,9 +65360,9 @@ function chooseModebarButtons(fullLayout) {
6534565360
}
6534665361
}
6534765362

65348-
if(allFixed) buttons = [['toImage']];
65363+
if(allFixed) buttons = [['toImage', 'sendDataToCloud']];
6534965364
else buttons = [
65350-
['toImage'],
65365+
['toImage', 'sendDataToCloud'],
6535165366
['zoom2d', 'pan2d'],
6535265367
['zoomIn2d', 'zoomOut2d', 'resetScale2d', 'autoScale2d']
6535365368
];
@@ -71686,37 +71701,8 @@ function positionPlayWithData(gd, container){
7168671701
.text(gd._context.linkText + ' ' + String.fromCharCode(187));
7168771702

7168871703
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)
7172071706
});
7172171707
}
7172271708
else {
@@ -71728,6 +71714,38 @@ function positionPlayWithData(gd, container){
7172871714
});
7172971715
}
7173071716
}
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+
}
7173171749

7173271750
plots.supplyDefaults = function(gd) {
7173371751
// fill in default values:

dist/plotly.js

+55-37
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ var rules = {
4343
"X [data-title]:hover:before,X [data-title]:hover:after": "display:block;opacity:1;",
4444
"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;",
4545
"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;",
4748
"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;",
4849
"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;",
4950
"Y .notifier-close:hover": "color:#444;text-decoration:none;cursor:pointer;"
@@ -123,6 +124,10 @@ module.exports = {
123124
'movie': {
124125
'width': 1000,
125126
'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'
126131
}
127132
};
128133
},{}],3:[function(require,module,exports){
@@ -53395,6 +53400,11 @@ proto.toImage = function() {
5339553400
});
5339653401
};
5339753402

53403+
proto.sendDataToCloud = function() {
53404+
var gd = this.graphInfo;
53405+
Plotly.Plots.sendDataToCloud(gd)
53406+
};
53407+
5339853408
/**
5339953409
*
5340053410
* @Property config specification hash of button parameters
@@ -53464,6 +53474,11 @@ proto.config = function config() {
5346453474
icon: 'camera',
5346553475
click: this.toImage
5346653476
},
53477+
sendDataToCloud: {
53478+
title: 'save and edit plot in cloud',
53479+
icon: 'disk',
53480+
click: this.sendDataToCloud
53481+
},
5346753482
// gl3d
5346853483
zoom3d: {
5346953484
title: 'Zoom',
@@ -60452,7 +60467,7 @@ module.exports = {
6045260467
showTips: true,
6045360468

6045460469
// link to open this plot in plotly
60455-
showLink: true,
60470+
showLink: false,
6045660471

6045760472
// if we show a link, does it contain data or just link to a plotly file?
6045860473
sendData: true,
@@ -64972,15 +64987,15 @@ fx.modeBar = function(gd){
6497264987
function chooseModebarButtons(fullLayout) {
6497364988
if(fullLayout._hasGL3D) {
6497464989
return [
64975-
['toImage'],
64990+
['toImage', 'sendDataToCloud'],
6497664991
['orbitRotation', 'tableRotation', 'zoom3d', 'pan3d'],
6497764992
['resetCameraDefault3d', 'resetCameraLastSave3d'],
6497864993
['hoverClosest3d']
6497964994
];
6498064995
}
6498164996
else if(fullLayout._hasGeo) {
6498264997
return [
64983-
['toImage'],
64998+
['toImage', 'sendDataToCloud'],
6498464999
['zoomInGeo', 'zoomOutGeo', 'resetGeo'],
6498565000
['hoverClosestGeo']
6498665001
];
@@ -64998,9 +65013,9 @@ function chooseModebarButtons(fullLayout) {
6499865013
}
6499965014
}
6500065015

65001-
if(allFixed) buttons = [['toImage']];
65016+
if(allFixed) buttons = [['toImage', 'sendDataToCloud']];
6500265017
else buttons = [
65003-
['toImage'],
65018+
['toImage', 'sendDataToCloud'],
6500465019
['zoom2d', 'pan2d'],
6500565020
['zoomIn2d', 'zoomOut2d', 'resetScale2d', 'autoScale2d']
6500665021
];
@@ -71056,37 +71071,8 @@ function positionPlayWithData(gd, container){
7105671071
.text(gd._context.linkText + ' ' + String.fromCharCode(187));
7105771072

7105871073
if(gd._context.sendData) {
71059-
link.on('click',function(){
71060-
gd.emit('plotly_beforeexport');
71061-
71062-
var baseUrl = (window.PLOTLYENV && window.PLOTLYENV.BASE_URL) || 'https://plot.ly';
71063-
71064-
var hiddenformDiv = d3.select(gd)
71065-
.append('div')
71066-
.attr('id', 'hiddenform')
71067-
.style('display', 'none');
71068-
71069-
var hiddenform = hiddenformDiv
71070-
.append('form')
71071-
.attr({
71072-
action: baseUrl + '/external',
71073-
method: 'post',
71074-
target: '_blank'
71075-
});
71076-
71077-
var hiddenformInput = hiddenform
71078-
.append('input')
71079-
.attr({
71080-
type: 'text',
71081-
name: 'data'
71082-
});
71083-
71084-
hiddenformInput.node().value = plots.graphJson(gd, false, 'keepdata');
71085-
hiddenform.node().submit();
71086-
hiddenformDiv.remove();
71087-
71088-
gd.emit('plotly_afterexport');
71089-
return false;
71074+
link.on('click', function() {
71075+
plots.sendDataToCloud(gd)
7109071076
});
7109171077
}
7109271078
else {
@@ -71098,6 +71084,38 @@ function positionPlayWithData(gd, container){
7109871084
});
7109971085
}
7110071086
}
71087+
plots.sendDataToCloud = function(gd) {
71088+
gd.emit('plotly_beforeexport');
71089+
71090+
var baseUrl = (window.PLOTLYENV && window.PLOTLYENV.BASE_URL) || 'https://plot.ly';
71091+
71092+
var hiddenformDiv = d3.select(gd)
71093+
.append('div')
71094+
.attr('id', 'hiddenform')
71095+
.style('display', 'none');
71096+
71097+
var hiddenform = hiddenformDiv
71098+
.append('form')
71099+
.attr({
71100+
action: baseUrl + '/external',
71101+
method: 'post',
71102+
target: '_blank'
71103+
});
71104+
71105+
var hiddenformInput = hiddenform
71106+
.append('input')
71107+
.attr({
71108+
type: 'text',
71109+
name: 'data'
71110+
});
71111+
71112+
hiddenformInput.node().value = plots.graphJson(gd, false, 'keepdata');
71113+
hiddenform.node().submit();
71114+
hiddenformDiv.remove();
71115+
71116+
gd.emit('plotly_afterexport');
71117+
return false;
71118+
}
7110171119

7110271120
plots.supplyDefaults = function(gd) {
7110371121
// fill in default values:

0 commit comments

Comments
 (0)