Skip to content

Commit dd8a980

Browse files
committed
add build dist files
1 parent 39293cc commit dd8a980

File tree

3 files changed

+77
-65
lines changed

3 files changed

+77
-65
lines changed

build/plotcss.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var rules = {
99
"X a:hover": "text-decoration:none;",
1010
"X .crisp": "shape-rendering:crispEdges;",
1111
"X .user-select-none": "-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;",
12-
"X svg": "overflow:hidden;",
12+
"X svg": "overflow:visible;",
1313
"X svg a": "fill:#447adb;",
1414
"X svg a:hover": "fill:#3c6dc5;",
1515
"X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;",

dist/plotly.js

+74-56
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/**
2-
* plotly.js v1.58.4
3-
* Copyright 2012-2020, Plotly, Inc.
4-
* All rights reserved.
5-
* Licensed under the MIT license
6-
*/
71
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Plotly = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
82
'use strict';
93

@@ -16,7 +10,7 @@ var rules = {
1610
"X a:hover": "text-decoration:none;",
1711
"X .crisp": "shape-rendering:crispEdges;",
1812
"X .user-select-none": "-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;",
19-
"X svg": "overflow:hidden;",
13+
"X svg": "overflow:visible;",
2014
"X svg a": "fill:#447adb;",
2115
"X svg a:hover": "fill:#3c6dc5;",
2216
"X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;",
@@ -97424,7 +97418,7 @@ module.exports = {
9742497418
tracegroupgap: {
9742597419
valType: 'number',
9742697420
min: 0,
97427-
dflt: 10,
97421+
dflt: 0,
9742897422

9742997423
editType: 'legend',
9743097424

@@ -97554,7 +97548,7 @@ module.exports = {
9755497548
// number of px between legend title and (left) side of legend (always in x direction and from inner border)
9755597549
titlePad: 2,
9755697550
// number of px between each legend item (x and/or y direction)
97557-
itemGap: 5
97551+
itemGap: 1
9755897552
};
9755997553

9756097554
},{}],695:[function(_dereq_,module,exports){
@@ -97829,7 +97823,19 @@ module.exports = function draw(gd, opts) {
9782997823
var gs = fullLayout._size;
9783097824
var bw = opts.borderwidth;
9783197825

97832-
var lx = gs.l + gs.w * opts.x - FROM_TL[getXanchor(opts)] * opts._width;
97826+
var xanchor = getXanchor(opts);
97827+
var yanchor = getYanchor(opts);
97828+
// Adjust centering of the legend box
97829+
var lx;
97830+
if (xanchor === 'center' && yanchor === 'top') {
97831+
lx = (gs.w * opts.x - 0.5 * opts._width) * 1.8;
97832+
} else if (xanchor === 'center' && yanchor === 'bottom') {
97833+
lx = (gs.l + gs.w * opts.x - FROM_TL[getXanchor(opts)] * opts._width)-30;
97834+
} else if (xanchor === 'center' && yanchor === 'middle') {
97835+
lx = (gs.l + gs.w * opts.x - FROM_TL[getXanchor(opts)] * opts._width)-15;
97836+
} else {
97837+
lx = gs.l + gs.w * opts.x - FROM_TL[getXanchor(opts)] * opts._width;
97838+
}
9783397839
var ly = gs.t + gs.h * (1 - opts.y) - FROM_TL[getYanchor(opts)] * opts._effHeight;
9783497840

9783597841
if(opts._main && fullLayout.margin.autoexpand) {
@@ -98335,6 +98341,7 @@ function computeLegendDimensions(gd, groups, traces, opts) {
9833598341
}
9833698342
} else {
9833798343
var xanchor = getXanchor(opts);
98344+
var isCenterOfPlotArea = (xanchor === 'center');
9833898345
var isLeftOfPlotArea = opts.x < 0 || (opts.x === 0 && xanchor === 'right');
9833998346
var isRightOfPlotArea = opts.x > 1 || (opts.x === 1 && xanchor === 'left');
9834098347
var isBeyondPlotAreaY = isAbovePlotArea || isBelowPlotArea;
@@ -98344,6 +98351,7 @@ function computeLegendDimensions(gd, groups, traces, opts) {
9834498351
// - else if below/above plot area and anchored in the margin, extend to opposite margin,
9834598352
// - otherwise give it the maximum potential margin-push value
9834698353
opts._maxWidth = Math.max(
98354+
isCenterOfPlotArea ? fullLayout.width :
9834798355
isLeftOfPlotArea ? ((isBeyondPlotAreaY && xanchor === 'left') ? gs.l + gs.w : hw) :
9834898356
isRightOfPlotArea ? ((isBeyondPlotAreaY && xanchor === 'right') ? gs.r + gs.w : hw) :
9834998357
gs.w,
@@ -98363,6 +98371,7 @@ function computeLegendDimensions(gd, groups, traces, opts) {
9836398371
var maxGroupHeightInRow = 0;
9836498372
var groupOffsetX = 0;
9836598373
var groupOffsetY = 0;
98374+
var next = 0;
9836698375
groups.each(function() {
9836798376
var maxWidthInGroup = 0;
9836898377
var offsetY = 0;
@@ -98377,7 +98386,13 @@ function computeLegendDimensions(gd, groups, traces, opts) {
9837798386
});
9837898387
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
9837998388

98380-
var next = maxWidthInGroup + itemGap;
98389+
if (yanchor === 'top') {
98390+
next = fullLayout.width / 3.99;
98391+
} else if (yanchor === 'bottom') {
98392+
next = maxWidthInGroup + itemGap;
98393+
} else {
98394+
next = maxWidthInGroup + itemGap;
98395+
}
9838198396

9838298397
if((next + bw + groupOffsetX) > opts._maxWidth) {
9838398398
maxRowWidth = Math.max(maxRowWidth, groupOffsetX);
@@ -99244,7 +99259,7 @@ module.exports = function style(s, gd, legend) {
9924499259
.selectAll('path.legend' + desiredType)
9924599260
.data(isVisible ? [d] : []);
9924699261
barpath.enter().append('path').classed('legend' + desiredType, true)
99247-
.attr('d', 'M6,6H-6V-6H6Z')
99262+
.attr('d', 'M6,0A6,6 0 1,1 0,-6A6,6 0 0,1 6,0Z')
9924899263
.attr('transform', centerTransform);
9924999264
barpath.exit().remove();
9925099265

@@ -123044,64 +123059,67 @@ exports.drawMainTitle = function(gd) {
123044123059
var fullLayout = gd._fullLayout;
123045123060

123046123061
var textAnchor = getMainTitleTextAnchor(fullLayout);
123047-
var dy = getMainTitleDy(fullLayout);
123062+
// var dy = getMainTitleDy(fullLayout);
123048123063

123049123064
Titles.draw(gd, 'gtitle', {
123050123065
propContainer: fullLayout,
123051123066
propName: 'title.text',
123052123067
placeholder: fullLayout._dfltTitle.plot,
123053123068
attributes: {
123054-
x: getMainTitleX(fullLayout, textAnchor),
123055-
y: getMainTitleY(fullLayout, dy),
123069+
// x: getMainTitleX(fullLayout, textAnchor),
123070+
x: 0,
123071+
// y: getMainTitleY(fullLayout, dy),
123072+
y: 15,
123056123073
'text-anchor': textAnchor,
123057-
dy: dy
123074+
// dy: dy
123075+
dy: 0
123058123076
}
123059123077
});
123060123078
};
123061123079

123062-
function getMainTitleX(fullLayout, textAnchor) {
123063-
var title = fullLayout.title;
123064-
var gs = fullLayout._size;
123065-
var hPadShift = 0;
123080+
// function getMainTitleX(fullLayout, textAnchor) {
123081+
// var title = fullLayout.title;
123082+
// var gs = fullLayout._size;
123083+
// var hPadShift = 0;
123066123084

123067-
if(textAnchor === SVG_TEXT_ANCHOR_START) {
123068-
hPadShift = title.pad.l;
123069-
} else if(textAnchor === SVG_TEXT_ANCHOR_END) {
123070-
hPadShift = -title.pad.r;
123071-
}
123085+
// if(textAnchor === SVG_TEXT_ANCHOR_START) {
123086+
// hPadShift = title.pad.l;
123087+
// } else if(textAnchor === SVG_TEXT_ANCHOR_END) {
123088+
// hPadShift = -title.pad.r;
123089+
// }
123072123090

123073-
switch(title.xref) {
123074-
case 'paper':
123075-
return gs.l + gs.w * title.x + hPadShift;
123076-
case 'container':
123077-
default:
123078-
return fullLayout.width * title.x + hPadShift;
123079-
}
123080-
}
123091+
// switch(title.xref) {
123092+
// case 'paper':
123093+
// return gs.l + gs.w * title.x + hPadShift;
123094+
// case 'container':
123095+
// default:
123096+
// return fullLayout.width * title.x + hPadShift;
123097+
// }
123098+
// }
123081123099

123082-
function getMainTitleY(fullLayout, dy) {
123083-
var title = fullLayout.title;
123084-
var gs = fullLayout._size;
123085-
var vPadShift = 0;
123100+
// function getMainTitleY(fullLayout, dy) {
123101+
// var title = fullLayout.title;
123102+
// var gs = fullLayout._size;
123103+
// var vPadShift = 0;
123086123104

123087-
if(dy === '0em' || !dy) {
123088-
vPadShift = -title.pad.b;
123089-
} else if(dy === alignmentConstants.CAP_SHIFT + 'em') {
123090-
vPadShift = title.pad.t;
123091-
}
123105+
// if(dy === '0em' || !dy) {
123106+
// vPadShift = -title.pad.b;
123107+
// } else if(dy === alignmentConstants.CAP_SHIFT + 'em') {
123108+
// vPadShift = title.pad.t;
123109+
// }
123092123110

123093-
if(title.y === 'auto') {
123094-
return gs.t / 2;
123095-
} else {
123096-
switch(title.yref) {
123097-
case 'paper':
123098-
return gs.t + gs.h - gs.h * title.y + vPadShift;
123099-
case 'container':
123100-
default:
123101-
return fullLayout.height - fullLayout.height * title.y + vPadShift;
123102-
}
123103-
}
123104-
}
123111+
// if(title.y === 'auto') {
123112+
// return gs.t / 2;
123113+
// } else {
123114+
// switch(title.yref) {
123115+
// case 'paper':
123116+
// return gs.t + gs.h - gs.h * title.y + vPadShift;
123117+
// case 'container':
123118+
// default:
123119+
// return fullLayout.height - fullLayout.height * title.y + vPadShift;
123120+
// }
123121+
// }
123122+
// }
123105123123

123106123124
function getMainTitleTextAnchor(fullLayout) {
123107123125
var title = fullLayout.title;
@@ -135926,7 +135944,7 @@ module.exports = function setConvert(ax, fullLayout) {
135926135944

135927135945
if(!isFinite(ax._m) || !isFinite(ax._b) || ax._length < 0) {
135928135946
fullLayout._replotting = false;
135929-
throw new Error('Something went wrong with axis scaling');
135947+
// throw new Error('Something went wrong with axis scaling');
135930135948
}
135931135949
};
135932135950

@@ -147861,7 +147879,7 @@ plots.plotAutoSize = function plotAutoSize(gd, layout, fullLayout) {
147861147879

147862147880
// somehow we get a few extra px height sometimes...
147863147881
// just hide it
147864-
document.body.style.overflow = 'hidden';
147882+
document.body.style.overflow = 'visible';
147865147883
} else {
147866147884
// plotly.js - let the developers do what they want, either
147867147885
// provide height and width for the container div,

dist/plotly.min.js

+2-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)