Skip to content

Commit af9f9e7

Browse files
authored
Merge pull request #2111 from plotly/branch-1.31.2
Branch for 1.31.2
2 parents c69aeb1 + cc673fa commit af9f9e7

25 files changed

+303
-312
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

1212

13+
## [1.31.2] -- 2017-10-23
14+
15+
### Fixed
16+
- Fix multiple `table` restyle bugs [#2107]
17+
- Fix selection work when `visible: false` choropleth traces are present [#2099, #2109]
18+
- Fix (another) contour generation bug [#2091]
19+
20+
1321
## [1.31.1] -- 2017-10-16
1422

1523
### Fixed

dist/README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ The main plotly.js bundle includes all the official (non-beta) trace modules.
3737

3838
It be can imported as minified javascript
3939
- using dist file `dist/plotly.min.js`
40-
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.31.1.min.js
40+
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.31.2.min.js
4141

4242
or as raw javascript:
4343
- using dist file `dist/plotly.js`
44-
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.31.1.js
44+
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.31.2.js
4545
- using CommonJS with `require('plotly.js')`
4646

4747
If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plot.ly/javascript/reference/)), use dist file `dist/plotly-with-meta.js`
@@ -50,7 +50,7 @@ The main plotly.js bundle weights in at:
5050

5151
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
5252
|-----------|---------------|----------------------|---------------------|
53-
| 5.6 MB | 2.2 MB | 684.4 kB | 5.8 MB |
53+
| 5.6 MB | 2.2 MB | 684.5 kB | 5.8 MB |
5454

5555
## Partial bundles
5656

@@ -74,13 +74,13 @@ The `basic` partial bundle contains the `scatter`, `bar` and `pie` trace modules
7474
| dist bundle (minified) | `dist/plotly-basic.min.js` |
7575
| CDN URL (latest) | https://cdn.plot.ly/plotly-basic-latest.js |
7676
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-basic-latest.min.js |
77-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.31.1.js |
78-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.31.1.min.js |
77+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-basic-1.31.2.js |
78+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-basic-1.31.2.min.js |
7979
| CommonJS | `require('plotly.js/lib/index-basic')` |
8080

8181
| Raw size | Minified size | Minified + gzip size |
8282
|------|-----------------|------------------------|
83-
| 1.9 MB | 686.3 kB | 223.1 kB |
83+
| 1.9 MB | 686.2 kB | 223.1 kB |
8484

8585
### plotly.js cartesian
8686

@@ -92,8 +92,8 @@ The `cartesian` partial bundle contains the `scatter`, `bar`, `box`, `heatmap`,
9292
| dist bundle (minified) | `dist/plotly-cartesian.min.js` |
9393
| CDN URL (latest) | https://cdn.plot.ly/plotly-cartesian-latest.js |
9494
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-cartesian-latest.min.js |
95-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.31.1.js |
96-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.31.1.min.js |
95+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-cartesian-1.31.2.js |
96+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-cartesian-1.31.2.min.js |
9797
| CommonJS | `require('plotly.js/lib/index-cartesian')` |
9898

9999
| Raw size | Minified size | Minified + gzip size |
@@ -110,8 +110,8 @@ The `geo` partial bundle contains the `scatter`, `scattergeo` and `choropleth` t
110110
| dist bundle (minified) | `dist/plotly-geo.min.js` |
111111
| CDN URL (latest) | https://cdn.plot.ly/plotly-geo-latest.js |
112112
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-geo-latest.min.js |
113-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.31.1.js |
114-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.31.1.min.js |
113+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-geo-1.31.2.js |
114+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-geo-1.31.2.min.js |
115115
| CommonJS | `require('plotly.js/lib/index-geo')` |
116116

117117
| Raw size | Minified size | Minified + gzip size |
@@ -128,8 +128,8 @@ The `gl3d` partial bundle contains the `scatter`, `scatter3d`, `surface` and `me
128128
| dist bundle (minified) | `dist/plotly-gl3d.min.js` |
129129
| CDN URL (latest) | https://cdn.plot.ly/plotly-gl3d-latest.js |
130130
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl3d-latest.min.js |
131-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.31.1.js |
132-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.31.1.min.js |
131+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl3d-1.31.2.js |
132+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl3d-1.31.2.min.js |
133133
| CommonJS | `require('plotly.js/lib/index-gl3d')` |
134134

135135
| Raw size | Minified size | Minified + gzip size |
@@ -146,8 +146,8 @@ The `gl2d` partial bundle contains the `scatter`, `scattergl`, `pointcloud`, `he
146146
| dist bundle (minified) | `dist/plotly-gl2d.min.js` |
147147
| CDN URL (latest) | https://cdn.plot.ly/plotly-gl2d-latest.js |
148148
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-gl2d-latest.min.js |
149-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.31.1.js |
150-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.31.1.min.js |
149+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-gl2d-1.31.2.js |
150+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-gl2d-1.31.2.min.js |
151151
| CommonJS | `require('plotly.js/lib/index-gl2d')` |
152152

153153
| Raw size | Minified size | Minified + gzip size |
@@ -164,8 +164,8 @@ The `mapbox` partial bundle contains the `scatter` and `scattermapbox` trace mod
164164
| dist bundle (minified) | `dist/plotly-mapbox.min.js` |
165165
| CDN URL (latest) | https://cdn.plot.ly/plotly-mapbox-latest.js |
166166
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-mapbox-latest.min.js |
167-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.31.1.js |
168-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.31.1.min.js |
167+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-mapbox-1.31.2.js |
168+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-mapbox-1.31.2.min.js |
169169
| CommonJS | `require('plotly.js/lib/index-mapbox')` |
170170

171171
| Raw size | Minified size | Minified + gzip size |
@@ -182,8 +182,8 @@ The `finance` partial bundle contains the `scatter`, `bar`, `histogram`, `pie`,
182182
| dist bundle (minified) | `dist/plotly-finance.min.js` |
183183
| CDN URL (latest) | https://cdn.plot.ly/plotly-finance-latest.js |
184184
| CDN URL (latest minified) | https://cdn.plot.ly/plotly-finance-latest.min.js |
185-
| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.31.1.js |
186-
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.31.1.min.js |
185+
| CDN URL (tagged) | https://cdn.plot.ly/plotly-finance-1.31.2.js |
186+
| CDN URL (tagged minified) | https://cdn.plot.ly/plotly-finance-1.31.2.min.js |
187187
| CommonJS | `require('plotly.js/lib/index-finance')` |
188188

189189
| Raw size | Minified size | Minified + gzip size |

dist/npm-ls.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plotly.js",
3-
"version": "1.31.1",
3+
"version": "1.31.2",
44
"dependencies": {
55
"3d-view": {
66
"version": "2.0.0",

dist/plot-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21758,7 +21758,7 @@
2175821758
"arrayOk": true,
2175921759
"dflt": null,
2176021760
"role": "style",
21761-
"description": "The width of cells.",
21761+
"description": "The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths.",
2176221762
"editType": "calc"
2176321763
},
2176421764
"columnorder": {

dist/plotly-basic.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v1.31.1
2+
* plotly.js (basic) v1.31.2
33
* Copyright 2012-2017, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -29568,7 +29568,7 @@ exports.svgAttrs = {
2956829568
var Plotly = require('./plotly');
2956929569

2957029570
// package version injected by `npm run preprocess`
29571-
exports.version = '1.31.1';
29571+
exports.version = '1.31.2';
2957229572

2957329573
// inject promise polyfill
2957429574
require('es6-promise').polyfill();
@@ -46595,7 +46595,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
4659546595
for(i = 0; i < gd.calcdata.length; i++) {
4659646596
cd = gd.calcdata[i];
4659746597
trace = cd[0].trace;
46598-
if(!trace._module || !trace._module.selectPoints) continue;
46598+
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
4659946599

4660046600
if(dragOptions.subplot) {
4660146601
if(
@@ -54927,12 +54927,9 @@ var DESELECTDIM = require('../../constants/interactions').DESELECTDIM;
5492754927
module.exports = function selectPoints(searchInfo, polygon) {
5492854928
var cd = searchInfo.cd;
5492954929
var selection = [];
54930-
var trace = cd[0].trace;
5493154930
var node3 = cd[0].node3;
5493254931
var i;
5493354932

54934-
if(trace.visible !== true) return [];
54935-
5493654933
if(polygon === false) {
5493754934
// clear selection
5493854935
for(i = 0; i < cd.length; i++) {
@@ -59450,7 +59447,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
5945059447

5945159448
// TODO: include lines? that would require per-segment line properties
5945259449
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
59453-
if(trace.visible !== true || hasOnlyLines) return [];
59450+
if(hasOnlyLines) return [];
5945459451

5945559452
var opacity = Array.isArray(marker.opacity) ? 1 : marker.opacity;
5945659453

dist/plotly-basic.min.js

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

dist/plotly-cartesian.js

+34-38
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (cartesian) v1.31.1
2+
* plotly.js (cartesian) v1.31.2
33
* Copyright 2012-2017, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -29666,7 +29666,7 @@ exports.svgAttrs = {
2966629666
var Plotly = require('./plotly');
2966729667

2966829668
// package version injected by `npm run preprocess`
29669-
exports.version = '1.31.1';
29669+
exports.version = '1.31.2';
2967029670

2967129671
// inject promise polyfill
2967229672
require('es6-promise').polyfill();
@@ -46693,7 +46693,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
4669346693
for(i = 0; i < gd.calcdata.length; i++) {
4669446694
cd = gd.calcdata[i];
4669546695
trace = cd[0].trace;
46696-
if(!trace._module || !trace._module.selectPoints) continue;
46696+
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
4669746697

4669846698
if(dragOptions.subplot) {
4669946699
if(
@@ -56185,12 +56185,9 @@ var DESELECTDIM = require('../../constants/interactions').DESELECTDIM;
5618556185
module.exports = function selectPoints(searchInfo, polygon) {
5618656186
var cd = searchInfo.cd;
5618756187
var selection = [];
56188-
var trace = cd[0].trace;
5618956188
var node3 = cd[0].node3;
5619056189
var i;
5619156190

56192-
if(trace.visible !== true) return [];
56193-
5619456191
if(polygon === false) {
5619556192
// clear selection
5619656193
for(i = 0; i < cd.length; i++) {
@@ -58598,18 +58595,13 @@ function makePath(pi, loc, edgeflag, xtol, ytol) {
5859858595
if(cnt === 10000) {
5859958596
Lib.log('Infinite loop in contour?');
5860058597
}
58601-
var closedpath = equalPts(pts[0], pts[pts.length - 1], xtol, ytol),
58602-
totaldist = 0,
58603-
distThresholdFactor = 0.2 * pi.smoothing,
58604-
alldists = [],
58605-
cropstart = 0,
58606-
distgroup,
58607-
cnt2,
58608-
cnt3,
58609-
newpt,
58610-
ptcnt,
58611-
ptavg,
58612-
thisdist;
58598+
var closedpath = equalPts(pts[0], pts[pts.length - 1], xtol, ytol);
58599+
var totaldist = 0;
58600+
var distThresholdFactor = 0.2 * pi.smoothing;
58601+
var alldists = [];
58602+
var cropstart = 0;
58603+
var distgroup, cnt2, cnt3, newpt, ptcnt, ptavg, thisdist,
58604+
i, j, edgepathi, edgepathj;
5861358605

5861458606
/*
5861558607
* Check for points that are too close together (<1/5 the average dist
@@ -58694,41 +58686,45 @@ function makePath(pi, loc, edgeflag, xtol, ytol) {
5869458686

5869558687
// edge path - does it start where an existing edge path ends, or vice versa?
5869658688
var merged = false;
58697-
pi.edgepaths.forEach(function(edgepath, edgei) {
58698-
if(!merged && equalPts(edgepath[0], pts[pts.length - 1], xtol, ytol)) {
58689+
for(i = 0; i < pi.edgepaths.length; i++) {
58690+
edgepathi = pi.edgepaths[i];
58691+
if(!merged && equalPts(edgepathi[0], pts[pts.length - 1], xtol, ytol)) {
5869958692
pts.pop();
5870058693
merged = true;
5870158694

5870258695
// now does it ALSO meet the end of another (or the same) path?
5870358696
var doublemerged = false;
58704-
pi.edgepaths.forEach(function(edgepath2, edgei2) {
58705-
if(!doublemerged && equalPts(
58706-
edgepath2[edgepath2.length - 1], pts[0], xtol, ytol)) {
58697+
for(j = 0; j < pi.edgepaths.length; j++) {
58698+
edgepathj = pi.edgepaths[j];
58699+
if(equalPts(edgepathj[edgepathj.length - 1], pts[0], xtol, ytol)) {
5870758700
doublemerged = true;
58708-
pts.splice(0, 1);
58709-
pi.edgepaths.splice(edgei, 1);
58710-
if(edgei2 === edgei) {
58701+
pts.shift();
58702+
pi.edgepaths.splice(i, 1);
58703+
if(j === i) {
5871158704
// the path is now closed
58712-
pi.paths.push(pts.concat(edgepath2));
58705+
pi.paths.push(pts.concat(edgepathj));
5871358706
}
5871458707
else {
58715-
pi.edgepaths[edgei2] =
58716-
pi.edgepaths[edgei2].concat(pts, edgepath2);
58708+
if(j > i) j--;
58709+
pi.edgepaths[j] = edgepathj.concat(pts, edgepathi);
5871758710
}
58711+
break;
5871858712
}
58719-
});
58713+
}
5872058714
if(!doublemerged) {
58721-
pi.edgepaths[edgei] = pts.concat(edgepath);
58715+
pi.edgepaths[i] = pts.concat(edgepathi);
5872258716
}
5872358717
}
58724-
});
58725-
pi.edgepaths.forEach(function(edgepath, edgei) {
58726-
if(!merged && equalPts(edgepath[edgepath.length - 1], pts[0], xtol, ytol)) {
58727-
pts.splice(0, 1);
58728-
pi.edgepaths[edgei] = edgepath.concat(pts);
58718+
}
58719+
for(i = 0; i < pi.edgepaths.length; i++) {
58720+
if(merged) break;
58721+
edgepathi = pi.edgepaths[i];
58722+
if(equalPts(edgepathi[edgepathi.length - 1], pts[0], xtol, ytol)) {
58723+
pts.shift();
58724+
pi.edgepaths[i] = edgepathi.concat(pts);
5872958725
merged = true;
5873058726
}
58731-
});
58727+
}
5873258728

5873358729
if(!merged) pi.edgepaths.push(pts);
5873458730
}
@@ -66554,7 +66550,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
6655466550

6655566551
// TODO: include lines? that would require per-segment line properties
6655666552
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
66557-
if(trace.visible !== true || hasOnlyLines) return [];
66553+
if(hasOnlyLines) return [];
6655866554

6655966555
var opacity = Array.isArray(marker.opacity) ? 1 : marker.opacity;
6656066556

dist/plotly-cartesian.min.js

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

dist/plotly-finance.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (finance) v1.31.1
2+
* plotly.js (finance) v1.31.2
33
* Copyright 2012-2017, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -29610,7 +29610,7 @@ exports.svgAttrs = {
2961029610
var Plotly = require('./plotly');
2961129611

2961229612
// package version injected by `npm run preprocess`
29613-
exports.version = '1.31.1';
29613+
exports.version = '1.31.2';
2961429614

2961529615
// inject promise polyfill
2961629616
require('es6-promise').polyfill();
@@ -46637,7 +46637,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
4663746637
for(i = 0; i < gd.calcdata.length; i++) {
4663846638
cd = gd.calcdata[i];
4663946639
trace = cd[0].trace;
46640-
if(!trace._module || !trace._module.selectPoints) continue;
46640+
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
4664146641

4664246642
if(dragOptions.subplot) {
4664346643
if(
@@ -54969,12 +54969,9 @@ var DESELECTDIM = require('../../constants/interactions').DESELECTDIM;
5496954969
module.exports = function selectPoints(searchInfo, polygon) {
5497054970
var cd = searchInfo.cd;
5497154971
var selection = [];
54972-
var trace = cd[0].trace;
5497354972
var node3 = cd[0].node3;
5497454973
var i;
5497554974

54976-
if(trace.visible !== true) return [];
54977-
5497854975
if(polygon === false) {
5497954976
// clear selection
5498054977
for(i = 0; i < cd.length; i++) {
@@ -62399,7 +62396,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
6239962396

6240062397
// TODO: include lines? that would require per-segment line properties
6240162398
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
62402-
if(trace.visible !== true || hasOnlyLines) return [];
62399+
if(hasOnlyLines) return [];
6240362400

6240462401
var opacity = Array.isArray(marker.opacity) ? 1 : marker.opacity;
6240562402

dist/plotly-finance.min.js

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

dist/plotly-geo-assets.js

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

0 commit comments

Comments
 (0)