diff --git a/package-lock.json b/package-lock.json
index 0fd02038..d1c5ea56 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,7 +11,7 @@
},
"devDependencies": {
"@ronilaukkarinen/gulp-stylelint": "^14.0.6",
- "bootstrap": "^4.6.1",
+ "bootstrap": "^4.6.2",
"del": "^6.1.1",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
@@ -27,11 +27,11 @@
"moment": "^2.29.4",
"moment-timezone": "^0.5.34",
"npm-force-resolutions": "^0.0.10",
- "plotly.js": "^2.12.1",
+ "plotly.js": "^2.13.2",
"popper.js": "^1.16.1",
"pulltorefreshjs": "^0.1.22",
"pump": "^3.0.0",
- "sass": "^1.53.0",
+ "sass": "^1.54.0",
"stylelint": "^14.9.1",
"stylelint-config-recommended-scss": "^7.0.0",
"stylelint-order": "^5.0.0",
@@ -1139,14 +1139,20 @@
}
},
"node_modules/bootstrap": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.1.tgz",
- "integrity": "sha512-0dj+VgI9Ecom+rvvpNZ4MUZJz8dcX7WCX+eTID9+/8HgOkv3dsRzi8BGeZJCQU6flWQVYxwTQnEZFrmJSEO7og==",
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz",
+ "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==",
"dev": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/bootstrap"
- },
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/twbs"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/bootstrap"
+ }
+ ],
"peerDependencies": {
"jquery": "1.9.1 - 3",
"popper.js": "^1.16.1"
@@ -6453,9 +6459,9 @@
}
},
"node_modules/plotly.js": {
- "version": "2.12.1",
- "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.12.1.tgz",
- "integrity": "sha512-XbZ3w3jSl+ihZPMXWwblmjinqbzdd+vT+3XKZpyffxmlMmTp/3vY1ewpQDuNyufUoiT0o0ekCqa80Qlzi7jwlA==",
+ "version": "2.13.2",
+ "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.13.2.tgz",
+ "integrity": "sha512-P/iVWM7ll6t/qE+M4EgRyIJmsXuoojq+vRX8a5XQwI0VJEeIaB5sdHlO93AzRzPU26GMh7D4VSM+FPvk4T+bkQ==",
"dev": true,
"dependencies": {
"@plotly/d3": "3.8.0",
@@ -6491,6 +6497,7 @@
"mouse-wheel": "^1.2.0",
"native-promise-only": "^0.8.1",
"parse-svg-path": "^0.1.2",
+ "point-in-polygon": "^1.1.0",
"polybooljs": "^1.2.0",
"probe-image-size": "^7.2.3",
"regl": "npm:@plotly/regl@^2.1.2",
@@ -6560,6 +6567,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/point-in-polygon": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.1.0.tgz",
+ "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==",
+ "dev": true
+ },
"node_modules/polybooljs": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/polybooljs/-/polybooljs-1.2.0.tgz",
@@ -7563,9 +7576,9 @@
"dev": true
},
"node_modules/sass": {
- "version": "1.53.0",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.53.0.tgz",
- "integrity": "sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==",
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz",
+ "integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==",
"dev": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
@@ -10597,9 +10610,9 @@
}
},
"bootstrap": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.1.tgz",
- "integrity": "sha512-0dj+VgI9Ecom+rvvpNZ4MUZJz8dcX7WCX+eTID9+/8HgOkv3dsRzi8BGeZJCQU6flWQVYxwTQnEZFrmJSEO7og==",
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz",
+ "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==",
"dev": true,
"requires": {}
},
@@ -14966,9 +14979,9 @@
}
},
"plotly.js": {
- "version": "2.12.1",
- "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.12.1.tgz",
- "integrity": "sha512-XbZ3w3jSl+ihZPMXWwblmjinqbzdd+vT+3XKZpyffxmlMmTp/3vY1ewpQDuNyufUoiT0o0ekCqa80Qlzi7jwlA==",
+ "version": "2.13.2",
+ "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.13.2.tgz",
+ "integrity": "sha512-P/iVWM7ll6t/qE+M4EgRyIJmsXuoojq+vRX8a5XQwI0VJEeIaB5sdHlO93AzRzPU26GMh7D4VSM+FPvk4T+bkQ==",
"dev": true,
"requires": {
"@plotly/d3": "3.8.0",
@@ -15004,6 +15017,7 @@
"mouse-wheel": "^1.2.0",
"native-promise-only": "^0.8.1",
"parse-svg-path": "^0.1.2",
+ "point-in-polygon": "^1.1.0",
"polybooljs": "^1.2.0",
"probe-image-size": "^7.2.3",
"regl": "npm:@plotly/regl@^2.1.2",
@@ -15063,6 +15077,12 @@
}
}
},
+ "point-in-polygon": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.1.0.tgz",
+ "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==",
+ "dev": true
+ },
"polybooljs": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/polybooljs/-/polybooljs-1.2.0.tgz",
@@ -15846,9 +15866,9 @@
"dev": true
},
"sass": {
- "version": "1.53.0",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.53.0.tgz",
- "integrity": "sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==",
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz",
+ "integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==",
"dev": true,
"requires": {
"chokidar": ">=3.0.0 <4.0.0",
diff --git a/package.json b/package.json
index c30736ef..e8cba1f7 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
},
"devDependencies": {
"@ronilaukkarinen/gulp-stylelint": "^14.0.6",
- "bootstrap": "^4.6.1",
+ "bootstrap": "^4.6.2",
"del": "^6.1.1",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
@@ -24,11 +24,11 @@
"moment": "^2.29.4",
"moment-timezone": "^0.5.34",
"npm-force-resolutions": "^0.0.10",
- "plotly.js": "^2.12.1",
+ "plotly.js": "^2.13.2",
"popper.js": "^1.16.1",
"pulltorefreshjs": "^0.1.22",
"pump": "^3.0.0",
- "sass": "^1.53.0",
+ "sass": "^1.54.0",
"stylelint": "^14.9.1",
"stylelint-config-recommended-scss": "^7.0.0",
"stylelint-order": "^5.0.0",
diff --git a/static/babybuddy/css/app.06e5b947338f.css.gz b/static/babybuddy/css/app.06e5b947338f.css.gz
deleted file mode 100644
index 2c982abd..00000000
Binary files a/static/babybuddy/css/app.06e5b947338f.css.gz and /dev/null differ
diff --git a/static/babybuddy/css/app.css b/static/babybuddy/css/app.css
index 7abc3727..2648b915 100644
--- a/static/babybuddy/css/app.css
+++ b/static/babybuddy/css/app.css
@@ -1,8 +1,8 @@
@charset "UTF-8";
/*!
- * Bootstrap v4.6.1 (https://getbootstrap.com/)
- * Copyright 2011-2021 The Bootstrap Authors
- * Copyright 2011-2021 Twitter, Inc.
+ * Bootstrap v4.6.2 (https://getbootstrap.com/)
+ * Copyright 2011-2022 The Bootstrap Authors
+ * Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
@@ -421,7 +421,7 @@ hr {
small,
.small {
- font-size: 80%;
+ font-size: 0.875em;
font-weight: 400;
}
@@ -460,7 +460,7 @@ mark,
.blockquote-footer {
display: block;
- font-size: 80%;
+ font-size: 0.875em;
color: #6c757d;
}
.blockquote-footer::before {
@@ -1994,7 +1994,7 @@ textarea.form-control {
display: none;
width: 100%;
margin-top: 0.25rem;
- font-size: 80%;
+ font-size: 0.875em;
color: #28a745;
}
@@ -2095,7 +2095,7 @@ textarea.form-control {
display: none;
width: 100%;
margin-top: 0.25rem;
- font-size: 80%;
+ font-size: 0.875em;
color: #dc3545;
}
@@ -2910,6 +2910,16 @@ input[type=button].btn-block {
transition: none;
}
}
+.collapsing.width {
+ width: 0;
+ height: auto;
+ transition: width 0.35s ease;
+}
+@media (prefers-reduced-motion: reduce) {
+ .collapsing.width {
+ transition: none;
+ }
+}
.dropup,
.dropright,
@@ -3434,7 +3444,7 @@ input[type=button].btn-block {
display: block;
min-height: 1.5rem;
padding-left: 1.5rem;
- color-adjust: exact;
+ print-color-adjust: exact;
}
.custom-control-inline {
@@ -3488,7 +3498,7 @@ input[type=button].btn-block {
pointer-events: none;
content: "";
background-color: #fff;
- border: #adb5bd solid 1px;
+ border: 1px solid #adb5bd;
}
.custom-control-label::after {
position: absolute;
@@ -3851,11 +3861,13 @@ input[type=button].btn-block {
}
.nav-tabs .nav-link {
margin-bottom: -1px;
+ background-color: transparent;
border: 1px solid transparent;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
+ isolation: isolate;
border-color: #e9ecef #e9ecef #dee2e6;
}
.nav-tabs .nav-link.disabled {
@@ -3876,6 +3888,8 @@ input[type=button].btn-block {
}
.nav-pills .nav-link {
+ background: none;
+ border: 0;
border-radius: 0.25rem;
}
.nav-pills .nav-link.active,
@@ -5605,8 +5619,8 @@ a.close.disabled {
text-transform: none;
letter-spacing: normal;
word-break: normal;
- word-spacing: normal;
white-space: normal;
+ word-spacing: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
@@ -5707,8 +5721,8 @@ a.close.disabled {
text-transform: none;
letter-spacing: normal;
word-break: normal;
- word-spacing: normal;
white-space: normal;
+ word-spacing: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
@@ -6025,7 +6039,7 @@ a.close.disabled {
width: 2rem;
height: 2rem;
vertical-align: -0.125em;
- border: 0.25em solid currentColor;
+ border: 0.25em solid currentcolor;
border-right-color: transparent;
border-radius: 50%;
animation: 0.75s linear infinite spinner-border;
@@ -6051,7 +6065,7 @@ a.close.disabled {
width: 2rem;
height: 2rem;
vertical-align: -0.125em;
- background-color: currentColor;
+ background-color: currentcolor;
border-radius: 50%;
opacity: 0;
animation: 0.75s linear infinite spinner-grow;
diff --git a/static/babybuddy/css/app.css.gz b/static/babybuddy/css/app.css.gz
index 2f371948..12aa2175 100644
Binary files a/static/babybuddy/css/app.css.gz and b/static/babybuddy/css/app.css.gz differ
diff --git a/static/babybuddy/css/app.06e5b947338f.css b/static/babybuddy/css/app.f8b494589646.css
similarity index 99%
rename from static/babybuddy/css/app.06e5b947338f.css
rename to static/babybuddy/css/app.f8b494589646.css
index efce7bb2..8fd2e5fa 100644
--- a/static/babybuddy/css/app.06e5b947338f.css
+++ b/static/babybuddy/css/app.f8b494589646.css
@@ -1,8 +1,8 @@
@charset "UTF-8";
/*!
- * Bootstrap v4.6.1 (https://getbootstrap.com/)
- * Copyright 2011-2021 The Bootstrap Authors
- * Copyright 2011-2021 Twitter, Inc.
+ * Bootstrap v4.6.2 (https://getbootstrap.com/)
+ * Copyright 2011-2022 The Bootstrap Authors
+ * Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
@@ -421,7 +421,7 @@ hr {
small,
.small {
- font-size: 80%;
+ font-size: 0.875em;
font-weight: 400;
}
@@ -460,7 +460,7 @@ mark,
.blockquote-footer {
display: block;
- font-size: 80%;
+ font-size: 0.875em;
color: #6c757d;
}
.blockquote-footer::before {
@@ -1994,7 +1994,7 @@ textarea.form-control {
display: none;
width: 100%;
margin-top: 0.25rem;
- font-size: 80%;
+ font-size: 0.875em;
color: #28a745;
}
@@ -2095,7 +2095,7 @@ textarea.form-control {
display: none;
width: 100%;
margin-top: 0.25rem;
- font-size: 80%;
+ font-size: 0.875em;
color: #dc3545;
}
@@ -2910,6 +2910,16 @@ input[type=button].btn-block {
transition: none;
}
}
+.collapsing.width {
+ width: 0;
+ height: auto;
+ transition: width 0.35s ease;
+}
+@media (prefers-reduced-motion: reduce) {
+ .collapsing.width {
+ transition: none;
+ }
+}
.dropup,
.dropright,
@@ -3434,7 +3444,7 @@ input[type=button].btn-block {
display: block;
min-height: 1.5rem;
padding-left: 1.5rem;
- color-adjust: exact;
+ print-color-adjust: exact;
}
.custom-control-inline {
@@ -3488,7 +3498,7 @@ input[type=button].btn-block {
pointer-events: none;
content: "";
background-color: #fff;
- border: #adb5bd solid 1px;
+ border: 1px solid #adb5bd;
}
.custom-control-label::after {
position: absolute;
@@ -3851,11 +3861,13 @@ input[type=button].btn-block {
}
.nav-tabs .nav-link {
margin-bottom: -1px;
+ background-color: transparent;
border: 1px solid transparent;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
+ isolation: isolate;
border-color: #e9ecef #e9ecef #dee2e6;
}
.nav-tabs .nav-link.disabled {
@@ -3876,6 +3888,8 @@ input[type=button].btn-block {
}
.nav-pills .nav-link {
+ background: none;
+ border: 0;
border-radius: 0.25rem;
}
.nav-pills .nav-link.active,
@@ -5605,8 +5619,8 @@ a.close.disabled {
text-transform: none;
letter-spacing: normal;
word-break: normal;
- word-spacing: normal;
white-space: normal;
+ word-spacing: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
@@ -5707,8 +5721,8 @@ a.close.disabled {
text-transform: none;
letter-spacing: normal;
word-break: normal;
- word-spacing: normal;
white-space: normal;
+ word-spacing: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
@@ -6025,7 +6039,7 @@ a.close.disabled {
width: 2rem;
height: 2rem;
vertical-align: -0.125em;
- border: 0.25em solid currentColor;
+ border: 0.25em solid currentcolor;
border-right-color: transparent;
border-radius: 50%;
animation: 0.75s linear infinite spinner-border;
@@ -6051,7 +6065,7 @@ a.close.disabled {
width: 2rem;
height: 2rem;
vertical-align: -0.125em;
- background-color: currentColor;
+ background-color: currentcolor;
border-radius: 50%;
opacity: 0;
animation: 0.75s linear infinite spinner-grow;
diff --git a/static/babybuddy/css/app.f8b494589646.css.gz b/static/babybuddy/css/app.f8b494589646.css.gz
new file mode 100644
index 00000000..071dde57
Binary files /dev/null and b/static/babybuddy/css/app.f8b494589646.css.gz differ
diff --git a/static/babybuddy/js/graph.81d7e15ea5a8.js b/static/babybuddy/js/graph.770f14765845.js
similarity index 96%
rename from static/babybuddy/js/graph.81d7e15ea5a8.js
rename to static/babybuddy/js/graph.770f14765845.js
index 3157b216..d09198bc 100644
--- a/static/babybuddy/js/graph.81d7e15ea5a8.js
+++ b/static/babybuddy/js/graph.770f14765845.js
@@ -1,5 +1,5 @@
/**
-* plotly.js (cartesian) v2.12.1
+* plotly.js (cartesian) v2.13.2
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
@@ -55,9 +55,6 @@ var rules = {
"X [data-title]:after": "content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;",
"X .vertical [data-title]:before,X .vertical [data-title]:after": "top:0%;right:200%;",
"X .vertical [data-title]:before": "border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",
- "X .select-outline": "fill:none;stroke-width:1;shape-rendering:crispEdges;",
- "X .select-outline-1": "stroke:#fff;",
- "X .select-outline-2": "stroke:#000;stroke-dasharray:2px 2px;",
Y: "font-family:\"Open Sans\",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
"Y p": "margin:0;",
"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,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;",
@@ -72,72 +69,72 @@ for(var selector in rules) {
Lib.addStyleRule(fullSelector, rules[selector]);
}
-},{"../src/lib":287}],2:[function(_dereq_,module,exports){
+},{"../src/lib":299}],2:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/aggregate');
-},{"../src/transforms/aggregate":547}],3:[function(_dereq_,module,exports){
+},{"../src/transforms/aggregate":556}],3:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/bar');
-},{"../src/traces/bar":396}],4:[function(_dereq_,module,exports){
+},{"../src/traces/bar":405}],4:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/box');
-},{"../src/traces/box":411}],5:[function(_dereq_,module,exports){
+},{"../src/traces/box":420}],5:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/components/calendars');
-},{"../src/components/calendars":155}],6:[function(_dereq_,module,exports){
+},{"../src/components/calendars":156}],6:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/contour');
-},{"../src/traces/contour":431}],7:[function(_dereq_,module,exports){
+},{"../src/traces/contour":440}],7:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/core');
-},{"../src/core":269}],8:[function(_dereq_,module,exports){
+},{"../src/core":281}],8:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/filter');
-},{"../src/transforms/filter":548}],9:[function(_dereq_,module,exports){
+},{"../src/transforms/filter":557}],9:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/groupby');
-},{"../src/transforms/groupby":549}],10:[function(_dereq_,module,exports){
+},{"../src/transforms/groupby":558}],10:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/heatmap');
-},{"../src/traces/heatmap":447}],11:[function(_dereq_,module,exports){
+},{"../src/traces/heatmap":456}],11:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/histogram');
-},{"../src/traces/histogram":466}],12:[function(_dereq_,module,exports){
+},{"../src/traces/histogram":475}],12:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/histogram2d');
-},{"../src/traces/histogram2d":472}],13:[function(_dereq_,module,exports){
+},{"../src/traces/histogram2d":481}],13:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/histogram2dcontour');
-},{"../src/traces/histogram2dcontour":476}],14:[function(_dereq_,module,exports){
+},{"../src/traces/histogram2dcontour":485}],14:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/image');
-},{"../src/traces/image":484}],15:[function(_dereq_,module,exports){
+},{"../src/traces/image":493}],15:[function(_dereq_,module,exports){
'use strict';
var Plotly = _dereq_('./core');
@@ -173,22 +170,22 @@ module.exports = Plotly;
module.exports = _dereq_('../src/traces/pie');
-},{"../src/traces/pie":493}],17:[function(_dereq_,module,exports){
+},{"../src/traces/pie":502}],17:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/scatterternary');
-},{"../src/traces/scatterternary":534}],18:[function(_dereq_,module,exports){
+},{"../src/traces/scatterternary":543}],18:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/sort');
-},{"../src/transforms/sort":551}],19:[function(_dereq_,module,exports){
+},{"../src/transforms/sort":560}],19:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/violin');
-},{"../src/traces/violin":542}],20:[function(_dereq_,module,exports){
+},{"../src/traces/violin":551}],20:[function(_dereq_,module,exports){
!function() {
var d3 = {
version: "3.8.0"
@@ -8148,7 +8145,7 @@ function hasOwnProperty(obj, prop) {
}
}).call(this)}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":23,"_process":98,"inherits":22}],25:[function(_dereq_,module,exports){
+},{"./support/isBuffer":23,"_process":99,"inherits":22}],25:[function(_dereq_,module,exports){
'use strict'
exports.byteLength = byteLength
@@ -13884,7 +13881,7 @@ function getBoundingClientOffset (element) {
});
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},_dereq_("timers").setImmediate)
-},{"timers":120}],73:[function(_dereq_,module,exports){
+},{"timers":121}],73:[function(_dereq_,module,exports){
/*
object-assign
(c) Sindre Sorhus
@@ -14036,6 +14033,26 @@ function parseValues(args) {
}
},{}],75:[function(_dereq_,module,exports){
+// ray-casting algorithm based on
+// https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html
+
+module.exports = function pointInPolygonNested (point, vs, start, end) {
+ var x = point[0], y = point[1];
+ var inside = false;
+ if (start === undefined) start = 0;
+ if (end === undefined) end = vs.length;
+ var len = end - start;
+ for (var i = 0, j = len - 1; i < len; j = i++) {
+ var xi = vs[i+start][0], yi = vs[i+start][1];
+ var xj = vs[j+start][0], yj = vs[j+start][1];
+ var intersect = ((yi > y) !== (yj > y))
+ && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);
+ if (intersect) inside = !inside;
+ }
+ return inside;
+};
+
+},{}],76:[function(_dereq_,module,exports){
/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
@@ -14163,7 +14180,7 @@ if (typeof window === 'object')
module.exports = PolyBool;
-},{"./lib/build-log":76,"./lib/epsilon":77,"./lib/geojson":78,"./lib/intersecter":79,"./lib/segment-chainer":81,"./lib/segment-selector":82}],76:[function(_dereq_,module,exports){
+},{"./lib/build-log":77,"./lib/epsilon":78,"./lib/geojson":79,"./lib/intersecter":80,"./lib/segment-chainer":82,"./lib/segment-selector":83}],77:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -14278,7 +14295,7 @@ function BuildLog(){
module.exports = BuildLog;
-},{}],77:[function(_dereq_,module,exports){
+},{}],78:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -14450,7 +14467,7 @@ function Epsilon(eps){
module.exports = Epsilon;
-},{}],78:[function(_dereq_,module,exports){
+},{}],79:[function(_dereq_,module,exports){
// (c) Copyright 2017, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -14640,7 +14657,7 @@ var GeoJSON = {
module.exports = GeoJSON;
-},{}],79:[function(_dereq_,module,exports){
+},{}],80:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15147,7 +15164,7 @@ function Intersecter(selfIntersection, eps, buildLog){
module.exports = Intersecter;
-},{"./linked-list":80}],80:[function(_dereq_,module,exports){
+},{"./linked-list":81}],81:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15230,7 +15247,7 @@ var LinkedList = {
module.exports = LinkedList;
-},{}],81:[function(_dereq_,module,exports){
+},{}],82:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15484,7 +15501,7 @@ function SegmentChainer(segments, eps, buildLog){
module.exports = SegmentChainer;
-},{}],82:[function(_dereq_,module,exports){
+},{}],83:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15652,7 +15669,7 @@ var SegmentSelector = {
module.exports = SegmentSelector;
-},{}],83:[function(_dereq_,module,exports){
+},{}],84:[function(_dereq_,module,exports){
'use strict';
@@ -15748,7 +15765,7 @@ ProbeError.prototype.constructor = ProbeError;
exports.ProbeError = ProbeError;
-},{"stream":100,"stream-parser":116}],84:[function(_dereq_,module,exports){
+},{"stream":101,"stream-parser":117}],85:[function(_dereq_,module,exports){
/* eslint-disable no-bitwise */
/* eslint-disable consistent-return */
@@ -16020,7 +16037,7 @@ module.exports.get_orientation = function (data) {
}
};
-},{}],85:[function(_dereq_,module,exports){
+},{}],86:[function(_dereq_,module,exports){
// Utils used to parse miaf-based files (avif/heic/heif)
//
// ISO media file spec:
@@ -16323,7 +16340,7 @@ module.exports.getMimeType = function (data) {
return { type: 'avif', mime: 'image/avif' };
};
-},{"./common":83}],86:[function(_dereq_,module,exports){
+},{"./common":84}],87:[function(_dereq_,module,exports){
// Utils used to parse miaf-based files (avif/heic/heif)
//
// - image collections are not supported (only last size is reported)
@@ -16413,7 +16430,7 @@ module.exports = function (data) {
return result;
};
-},{"../common":83,"../exif_utils":84,"../miaf_utils":85}],87:[function(_dereq_,module,exports){
+},{"../common":84,"../exif_utils":85,"../miaf_utils":86}],88:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16440,7 +16457,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],88:[function(_dereq_,module,exports){
+},{"../common":84}],89:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16469,7 +16486,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],89:[function(_dereq_,module,exports){
+},{"../common":84}],90:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16516,7 +16533,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],90:[function(_dereq_,module,exports){
+},{"../common":84}],91:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16605,7 +16622,7 @@ module.exports = function (data) {
}
};
-},{"../common":83,"../exif_utils":84}],91:[function(_dereq_,module,exports){
+},{"../common":84,"../exif_utils":85}],92:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16638,7 +16655,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],92:[function(_dereq_,module,exports){
+},{"../common":84}],93:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16667,7 +16684,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],93:[function(_dereq_,module,exports){
+},{"../common":84}],94:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16814,7 +16831,7 @@ module.exports = function (data) {
};
};
-},{}],94:[function(_dereq_,module,exports){
+},{}],95:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16902,7 +16919,7 @@ module.exports = function (data) {
}
};
-},{"../common":83}],95:[function(_dereq_,module,exports){
+},{"../common":84}],96:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable no-bitwise */
@@ -17014,7 +17031,7 @@ module.exports = function (data) {
return result;
};
-},{"../common":83,"../exif_utils":84}],96:[function(_dereq_,module,exports){
+},{"../common":84,"../exif_utils":85}],97:[function(_dereq_,module,exports){
'use strict';
@@ -17031,7 +17048,7 @@ module.exports = {
webp: _dereq_('./parse_sync/webp')
};
-},{"./parse_sync/avif":86,"./parse_sync/bmp":87,"./parse_sync/gif":88,"./parse_sync/ico":89,"./parse_sync/jpeg":90,"./parse_sync/png":91,"./parse_sync/psd":92,"./parse_sync/svg":93,"./parse_sync/tiff":94,"./parse_sync/webp":95}],97:[function(_dereq_,module,exports){
+},{"./parse_sync/avif":87,"./parse_sync/bmp":88,"./parse_sync/gif":89,"./parse_sync/ico":90,"./parse_sync/jpeg":91,"./parse_sync/png":92,"./parse_sync/psd":93,"./parse_sync/svg":94,"./parse_sync/tiff":95,"./parse_sync/webp":96}],98:[function(_dereq_,module,exports){
'use strict';
@@ -17061,7 +17078,7 @@ module.exports = function get_image_size(src) {
module.exports.parsers = parsers;
-},{"./lib/parsers_sync":96}],98:[function(_dereq_,module,exports){
+},{"./lib/parsers_sync":97}],99:[function(_dereq_,module,exports){
// shim for using process in browser
var process = module.exports = {};
@@ -17247,7 +17264,7 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],99:[function(_dereq_,module,exports){
+},{}],100:[function(_dereq_,module,exports){
/* eslint-disable node/no-deprecated-api */
var buffer = _dereq_('buffer')
var Buffer = buffer.Buffer
@@ -17313,7 +17330,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
return buffer.SlowBuffer(size)
}
-},{"buffer":28}],100:[function(_dereq_,module,exports){
+},{"buffer":28}],101:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -17444,7 +17461,7 @@ Stream.prototype.pipe = function(dest, options) {
return dest;
};
-},{"events":27,"inherits":67,"readable-stream/lib/_stream_duplex.js":102,"readable-stream/lib/_stream_passthrough.js":103,"readable-stream/lib/_stream_readable.js":104,"readable-stream/lib/_stream_transform.js":105,"readable-stream/lib/_stream_writable.js":106,"readable-stream/lib/internal/streams/end-of-stream.js":110,"readable-stream/lib/internal/streams/pipeline.js":112}],101:[function(_dereq_,module,exports){
+},{"events":27,"inherits":67,"readable-stream/lib/_stream_duplex.js":103,"readable-stream/lib/_stream_passthrough.js":104,"readable-stream/lib/_stream_readable.js":105,"readable-stream/lib/_stream_transform.js":106,"readable-stream/lib/_stream_writable.js":107,"readable-stream/lib/internal/streams/end-of-stream.js":111,"readable-stream/lib/internal/streams/pipeline.js":113}],102:[function(_dereq_,module,exports){
'use strict';
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
@@ -17573,7 +17590,7 @@ createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
module.exports.codes = codes;
-},{}],102:[function(_dereq_,module,exports){
+},{}],103:[function(_dereq_,module,exports){
(function (process){(function (){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -17715,7 +17732,7 @@ Object.defineProperty(Duplex.prototype, 'destroyed', {
}
});
}).call(this)}).call(this,_dereq_('_process'))
-},{"./_stream_readable":104,"./_stream_writable":106,"_process":98,"inherits":67}],103:[function(_dereq_,module,exports){
+},{"./_stream_readable":105,"./_stream_writable":107,"_process":99,"inherits":67}],104:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -17755,7 +17772,7 @@ function PassThrough(options) {
PassThrough.prototype._transform = function (chunk, encoding, cb) {
cb(null, chunk);
};
-},{"./_stream_transform":105,"inherits":67}],104:[function(_dereq_,module,exports){
+},{"./_stream_transform":106,"inherits":67}],105:[function(_dereq_,module,exports){
(function (process,global){(function (){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -18882,7 +18899,7 @@ function indexOf(xs, x) {
return -1;
}
}).call(this)}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../errors":101,"./_stream_duplex":102,"./internal/streams/async_iterator":107,"./internal/streams/buffer_list":108,"./internal/streams/destroy":109,"./internal/streams/from":111,"./internal/streams/state":113,"./internal/streams/stream":114,"_process":98,"buffer":28,"events":27,"inherits":67,"string_decoder/":115,"util":26}],105:[function(_dereq_,module,exports){
+},{"../errors":102,"./_stream_duplex":103,"./internal/streams/async_iterator":108,"./internal/streams/buffer_list":109,"./internal/streams/destroy":110,"./internal/streams/from":112,"./internal/streams/state":114,"./internal/streams/stream":115,"_process":99,"buffer":28,"events":27,"inherits":67,"string_decoder/":116,"util":26}],106:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -19084,7 +19101,7 @@ function done(stream, er, data) {
if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
return stream.push(null);
}
-},{"../errors":101,"./_stream_duplex":102,"inherits":67}],106:[function(_dereq_,module,exports){
+},{"../errors":102,"./_stream_duplex":103,"inherits":67}],107:[function(_dereq_,module,exports){
(function (process,global){(function (){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -19784,7 +19801,7 @@ Writable.prototype._destroy = function (err, cb) {
cb(err);
};
}).call(this)}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../errors":101,"./_stream_duplex":102,"./internal/streams/destroy":109,"./internal/streams/state":113,"./internal/streams/stream":114,"_process":98,"buffer":28,"inherits":67,"util-deprecate":122}],107:[function(_dereq_,module,exports){
+},{"../errors":102,"./_stream_duplex":103,"./internal/streams/destroy":110,"./internal/streams/state":114,"./internal/streams/stream":115,"_process":99,"buffer":28,"inherits":67,"util-deprecate":123}],108:[function(_dereq_,module,exports){
(function (process){(function (){
'use strict';
@@ -19994,7 +20011,7 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat
module.exports = createReadableStreamAsyncIterator;
}).call(this)}).call(this,_dereq_('_process'))
-},{"./end-of-stream":110,"_process":98}],108:[function(_dereq_,module,exports){
+},{"./end-of-stream":111,"_process":99}],109:[function(_dereq_,module,exports){
'use strict';
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
@@ -20205,7 +20222,7 @@ function () {
return BufferList;
}();
-},{"buffer":28,"util":26}],109:[function(_dereq_,module,exports){
+},{"buffer":28,"util":26}],110:[function(_dereq_,module,exports){
(function (process){(function (){
'use strict'; // undocumented cb() API, needed for core, not for public API
@@ -20313,7 +20330,7 @@ module.exports = {
errorOrDestroy: errorOrDestroy
};
}).call(this)}).call(this,_dereq_('_process'))
-},{"_process":98}],110:[function(_dereq_,module,exports){
+},{"_process":99}],111:[function(_dereq_,module,exports){
// Ported from https://github.com/mafintosh/end-of-stream with
// permission from the author, Mathias Buus (@mafintosh).
'use strict';
@@ -20418,12 +20435,12 @@ function eos(stream, opts, callback) {
}
module.exports = eos;
-},{"../../../errors":101}],111:[function(_dereq_,module,exports){
+},{"../../../errors":102}],112:[function(_dereq_,module,exports){
module.exports = function () {
throw new Error('Readable.from is not available in the browser')
};
-},{}],112:[function(_dereq_,module,exports){
+},{}],113:[function(_dereq_,module,exports){
// Ported from https://github.com/mafintosh/pump with
// permission from the author, Mathias Buus (@mafintosh).
'use strict';
@@ -20521,7 +20538,7 @@ function pipeline() {
}
module.exports = pipeline;
-},{"../../../errors":101,"./end-of-stream":110}],113:[function(_dereq_,module,exports){
+},{"../../../errors":102,"./end-of-stream":111}],114:[function(_dereq_,module,exports){
'use strict';
var ERR_INVALID_OPT_VALUE = _dereq_('../../../errors').codes.ERR_INVALID_OPT_VALUE;
@@ -20549,10 +20566,10 @@ function getHighWaterMark(state, options, duplexKey, isDuplex) {
module.exports = {
getHighWaterMark: getHighWaterMark
};
-},{"../../../errors":101}],114:[function(_dereq_,module,exports){
+},{"../../../errors":102}],115:[function(_dereq_,module,exports){
module.exports = _dereq_('events').EventEmitter;
-},{"events":27}],115:[function(_dereq_,module,exports){
+},{"events":27}],116:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -20849,7 +20866,7 @@ function simpleWrite(buf) {
function simpleEnd(buf) {
return buf && buf.length ? this.write(buf) : '';
}
-},{"safe-buffer":99}],116:[function(_dereq_,module,exports){
+},{"safe-buffer":100}],117:[function(_dereq_,module,exports){
(function (process,Buffer){(function (){
/**
@@ -21152,7 +21169,7 @@ function trampoline (fn) {
}
}).call(this)}).call(this,_dereq_('_process'),_dereq_("buffer").Buffer)
-},{"_process":98,"assert":21,"buffer":28,"debug":117}],117:[function(_dereq_,module,exports){
+},{"_process":99,"assert":21,"buffer":28,"debug":118}],118:[function(_dereq_,module,exports){
(function (process){(function (){
/**
* This is the web browser implementation of `debug()`.
@@ -21341,7 +21358,7 @@ function localstorage() {
}
}).call(this)}).call(this,_dereq_('_process'))
-},{"./debug":118,"_process":98}],118:[function(_dereq_,module,exports){
+},{"./debug":119,"_process":99}],119:[function(_dereq_,module,exports){
/**
* This is the common logic for both the Node.js and web browser
@@ -21545,7 +21562,7 @@ function coerce(val) {
return val;
}
-},{"ms":119}],119:[function(_dereq_,module,exports){
+},{"ms":120}],120:[function(_dereq_,module,exports){
/**
* Helpers.
*/
@@ -21699,7 +21716,7 @@ function plural(ms, n, name) {
return Math.ceil(ms / n) + ' ' + name + 's';
}
-},{}],120:[function(_dereq_,module,exports){
+},{}],121:[function(_dereq_,module,exports){
(function (setImmediate,clearImmediate){(function (){
var nextTick = _dereq_('process/browser.js').nextTick;
var apply = Function.prototype.apply;
@@ -21778,7 +21795,7 @@ exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate :
delete immediateIds[id];
};
}).call(this)}).call(this,_dereq_("timers").setImmediate,_dereq_("timers").clearImmediate)
-},{"process/browser.js":98,"timers":120}],121:[function(_dereq_,module,exports){
+},{"process/browser.js":99,"timers":121}],122:[function(_dereq_,module,exports){
// TinyColor v1.4.2
// https://github.com/bgrins/TinyColor
// Brian Grinstead, MIT License
@@ -22975,7 +22992,7 @@ else {
})(Math);
-},{}],122:[function(_dereq_,module,exports){
+},{}],123:[function(_dereq_,module,exports){
(function (global){(function (){
/**
@@ -23046,7 +23063,7 @@ function config (name) {
}
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],123:[function(_dereq_,module,exports){
+},{}],124:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -23779,7 +23796,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result)
}
-},{"../main":137,"object-assign":73}],124:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],125:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -23963,7 +23980,7 @@ assign(CopticCalendar.prototype, {
main.calendars.coptic = CopticCalendar;
-},{"../main":137,"object-assign":73}],125:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],126:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24191,7 +24208,7 @@ var centuries = {
main.calendars.discworld = DiscworldCalendar;
-},{"../main":137,"object-assign":73}],126:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],127:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24375,7 +24392,7 @@ assign(EthiopianCalendar.prototype, {
main.calendars.ethiopian = EthiopianCalendar;
-},{"../main":137,"object-assign":73}],127:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],128:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24649,7 +24666,7 @@ function mod(a, b) {
main.calendars.hebrew = HebrewCalendar;
-},{"../main":137,"object-assign":73}],128:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],129:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24830,7 +24847,7 @@ assign(IslamicCalendar.prototype, {
main.calendars.islamic = IslamicCalendar;
-},{"../main":137,"object-assign":73}],129:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],130:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25013,7 +25030,7 @@ assign(JulianCalendar.prototype, {
main.calendars.julian = JulianCalendar;
-},{"../main":137,"object-assign":73}],130:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],131:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25308,7 +25325,7 @@ function amod(a, b) {
main.calendars.mayan = MayanCalendar;
-},{"../main":137,"object-assign":73}],131:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],132:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25488,7 +25505,7 @@ assign(NanakshahiCalendar.prototype, {
main.calendars.nanakshahi = NanakshahiCalendar;
-},{"../main":137,"object-assign":73}],132:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],133:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25911,7 +25928,7 @@ assign(NepaliCalendar.prototype, {
main.calendars.nepali = NepaliCalendar;
-},{"../main":137,"object-assign":73}],133:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],134:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26101,7 +26118,7 @@ main.calendars.persian = PersianCalendar;
main.calendars.jalali = PersianCalendar;
-},{"../main":137,"object-assign":73}],134:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],135:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26287,7 +26304,7 @@ assign(TaiwanCalendar.prototype, {
main.calendars.taiwan = TaiwanCalendar;
-},{"../main":137,"object-assign":73}],135:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],136:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26473,7 +26490,7 @@ assign(ThaiCalendar.prototype, {
main.calendars.thai = ThaiCalendar;
-},{"../main":137,"object-assign":73}],136:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],137:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26838,7 +26855,7 @@ var ummalqura_dat = [
79990];
-},{"../main":137,"object-assign":73}],137:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],138:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -27743,7 +27760,7 @@ _exports.baseCalendar = BaseCalendar;
_exports.calendars.gregorian = GregorianCalendar;
-},{"object-assign":73}],138:[function(_dereq_,module,exports){
+},{"object-assign":73}],139:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -28245,7 +28262,7 @@ assign(main.baseCalendar.prototype, {
});
-},{"./main":137,"object-assign":73}],139:[function(_dereq_,module,exports){
+},{"./main":138,"object-assign":73}],140:[function(_dereq_,module,exports){
'use strict';
/**
@@ -28308,7 +28325,7 @@ module.exports = [
}
];
-},{}],140:[function(_dereq_,module,exports){
+},{}],141:[function(_dereq_,module,exports){
'use strict';
var ARROWPATHS = _dereq_('./arrow_paths');
@@ -28596,7 +28613,7 @@ module.exports = templatedArray('annotation', {
}
});
-},{"../../constants/axis_placeable_objects":263,"../../plot_api/plot_template":323,"../../plots/cartesian/constants":341,"../../plots/font_attributes":365,"./arrow_paths":139}],141:[function(_dereq_,module,exports){
+},{"../../constants/axis_placeable_objects":275,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353,"../../plots/font_attributes":374,"./arrow_paths":140}],142:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -28678,7 +28695,7 @@ function calcAxisExpansion(ann, ax) {
ann._extremes[axId] = extremes;
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"./draw":146}],142:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./draw":147}],143:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -28808,7 +28825,7 @@ function clickData2r(d, ax) {
return ax.type === 'log' ? ax.l2r(d) : ax.d2r(d);
}
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378}],143:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387}],144:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -28879,7 +28896,7 @@ module.exports = function handleAnnotationCommonDefaults(annIn, annOut, fullLayo
coerce('captureevents', !!hoverText);
};
-},{"../../lib":287,"../color":157}],144:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158}],145:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -28933,7 +28950,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) {
}
};
-},{"../../lib/to_log_range":312,"fast-isnumeric":33}],145:[function(_dereq_,module,exports){
+},{"../../lib/to_log_range":324,"fast-isnumeric":33}],146:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -29032,7 +29049,7 @@ function handleAnnotationDefaults(annIn, annOut, fullLayout) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"./attributes":140,"./common_defaults":143}],146:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":141,"./common_defaults":144}],147:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -29785,7 +29802,7 @@ function drawRaw(gd, options, index, subplotId, xa, ya) {
} else annText.call(textLayout);
}
-},{"../../lib":287,"../../lib/setcursor":307,"../../lib/svg_text_utils":310,"../../plot_api/plot_template":323,"../../plots/cartesian/axes":334,"../../plots/plots":371,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"../fx":197,"./draw_arrow_head":147,"@plotly/d3":20}],147:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/cartesian/axes":346,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../fx":198,"./draw_arrow_head":148,"@plotly/d3":20}],148:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -29932,7 +29949,7 @@ module.exports = function drawArrowHead(el3, ends, options) {
if(doEnd) drawhead(headStyle, end, endRot, scale);
};
-},{"../../lib":287,"../color":157,"./arrow_paths":139,"@plotly/d3":20}],148:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"./arrow_paths":140,"@plotly/d3":20}],149:[function(_dereq_,module,exports){
'use strict';
var drawModule = _dereq_('./draw');
@@ -29957,7 +29974,7 @@ module.exports = {
convertCoords: _dereq_('./convert_coords')
};
-},{"../../plots/cartesian/include_components":347,"./attributes":140,"./calc_autorange":141,"./click":142,"./convert_coords":144,"./defaults":145,"./draw":146}],149:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/include_components":357,"./attributes":141,"./calc_autorange":142,"./click":143,"./convert_coords":145,"./defaults":146,"./draw":147}],150:[function(_dereq_,module,exports){
'use strict';
var annAttrs = _dereq_('../annotations/attributes');
@@ -30026,7 +30043,7 @@ module.exports = overrideAll(templatedArray('annotation', {
// zref: 'z'
}), 'calc', 'from-root');
-},{"../../plot_api/edit_types":316,"../../plot_api/plot_template":323,"../annotations/attributes":140}],150:[function(_dereq_,module,exports){
+},{"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../annotations/attributes":141}],151:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -30083,7 +30100,7 @@ function mockAnnAxes(ann, scene) {
};
}
-},{"../../lib":287,"../../plots/cartesian/axes":334}],151:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346}],152:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -30151,7 +30168,7 @@ function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"../annotations/common_defaults":143,"./attributes":149}],152:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"../annotations/common_defaults":144,"./attributes":150}],153:[function(_dereq_,module,exports){
'use strict';
var drawRaw = _dereq_('../annotations/draw').drawRaw;
@@ -30195,7 +30212,7 @@ module.exports = function draw(scene) {
}
};
-},{"../../plots/gl3d/project":368,"../annotations/draw":146}],153:[function(_dereq_,module,exports){
+},{"../../plots/gl3d/project":377,"../annotations/draw":147}],154:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -30235,7 +30252,7 @@ function includeGL3D(layoutIn, layoutOut) {
}
}
-},{"../../lib":287,"../../registry":378,"./attributes":149,"./convert":150,"./defaults":151,"./draw":152}],154:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./attributes":150,"./convert":151,"./defaults":152,"./draw":153}],155:[function(_dereq_,module,exports){
'use strict';
// a trimmed down version of:
@@ -30260,7 +30277,7 @@ _dereq_('world-calendars/dist/calendars/taiwan');
_dereq_('world-calendars/dist/calendars/thai');
_dereq_('world-calendars/dist/calendars/ummalqura');
-},{"world-calendars/dist/calendars/chinese":123,"world-calendars/dist/calendars/coptic":124,"world-calendars/dist/calendars/discworld":125,"world-calendars/dist/calendars/ethiopian":126,"world-calendars/dist/calendars/hebrew":127,"world-calendars/dist/calendars/islamic":128,"world-calendars/dist/calendars/julian":129,"world-calendars/dist/calendars/mayan":130,"world-calendars/dist/calendars/nanakshahi":131,"world-calendars/dist/calendars/nepali":132,"world-calendars/dist/calendars/persian":133,"world-calendars/dist/calendars/taiwan":134,"world-calendars/dist/calendars/thai":135,"world-calendars/dist/calendars/ummalqura":136,"world-calendars/dist/main":137,"world-calendars/dist/plus":138}],155:[function(_dereq_,module,exports){
+},{"world-calendars/dist/calendars/chinese":124,"world-calendars/dist/calendars/coptic":125,"world-calendars/dist/calendars/discworld":126,"world-calendars/dist/calendars/ethiopian":127,"world-calendars/dist/calendars/hebrew":128,"world-calendars/dist/calendars/islamic":129,"world-calendars/dist/calendars/julian":130,"world-calendars/dist/calendars/mayan":131,"world-calendars/dist/calendars/nanakshahi":132,"world-calendars/dist/calendars/nepali":133,"world-calendars/dist/calendars/persian":134,"world-calendars/dist/calendars/taiwan":135,"world-calendars/dist/calendars/thai":136,"world-calendars/dist/calendars/ummalqura":137,"world-calendars/dist/main":138,"world-calendars/dist/plus":139}],156:[function(_dereq_,module,exports){
'use strict';
var calendars = _dereq_('./calendars');
@@ -30526,7 +30543,7 @@ module.exports = {
worldCalFmt: worldCalFmt
};
-},{"../../constants/numerical":267,"../../lib":287,"./calendars":154}],156:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"./calendars":155}],157:[function(_dereq_,module,exports){
'use strict';
@@ -30558,7 +30575,7 @@ exports.borderLine = '#BEC8D9';
// gives back exactly lightLine if the other colors are defaults.
exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4);
-},{}],157:[function(_dereq_,module,exports){
+},{}],158:[function(_dereq_,module,exports){
'use strict';
var tinycolor = _dereq_('tinycolor2');
@@ -30724,7 +30741,7 @@ function cleanOne(val) {
return 'rgb(' + rgbStr + ')';
}
-},{"../../lib/array":273,"./attributes":156,"fast-isnumeric":33,"tinycolor2":121}],158:[function(_dereq_,module,exports){
+},{"../../lib/array":285,"./attributes":157,"fast-isnumeric":33,"tinycolor2":122}],159:[function(_dereq_,module,exports){
'use strict';
var axesAttrs = _dereq_('../../plots/cartesian/layout_attributes');
@@ -30871,7 +30888,7 @@ module.exports = overrideAll({
}
}, 'colorbars', 'from-root');
-},{"../../lib/extend":281,"../../plot_api/edit_types":316,"../../plots/cartesian/layout_attributes":349,"../../plots/font_attributes":365}],159:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plots/cartesian/layout_attributes":359,"../../plots/font_attributes":374}],160:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -30891,7 +30908,7 @@ module.exports = {
}
};
-},{}],160:[function(_dereq_,module,exports){
+},{}],161:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -30985,7 +31002,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) {
coerce('title.side', isVertical ? 'top' : 'right');
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/cartesian/prefix_suffix_defaults":353,"../../plots/cartesian/tick_label_defaults":358,"../../plots/cartesian/tick_mark_defaults":359,"../../plots/cartesian/tick_value_defaults":360,"./attributes":158}],161:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/cartesian/prefix_suffix_defaults":363,"../../plots/cartesian/tick_label_defaults":367,"../../plots/cartesian/tick_mark_defaults":368,"../../plots/cartesian/tick_value_defaults":369,"./attributes":159}],162:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -31970,7 +31987,7 @@ module.exports = {
draw: draw
};
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/extend":281,"../../lib/setcursor":307,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../plots/cartesian/axis_defaults":336,"../../plots/cartesian/layout_attributes":349,"../../plots/cartesian/position_defaults":352,"../../plots/plots":371,"../../registry":378,"../color":157,"../colorscale/helpers":168,"../dragelement":176,"../drawing":179,"../titles":255,"./constants":159,"@plotly/d3":20,"tinycolor2":121}],162:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/extend":293,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../plots/cartesian/axis_defaults":348,"../../plots/cartesian/layout_attributes":359,"../../plots/cartesian/position_defaults":362,"../../plots/plots":380,"../../registry":387,"../color":158,"../colorscale/helpers":169,"../dragelement":177,"../drawing":180,"../titles":267,"./constants":160,"@plotly/d3":20,"tinycolor2":122}],163:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -31980,7 +31997,7 @@ module.exports = function hasColorbar(container) {
return Lib.isPlainObject(container.colorbar);
};
-},{"../../lib":287}],163:[function(_dereq_,module,exports){
+},{"../../lib":299}],164:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -31994,7 +32011,7 @@ module.exports = {
hasColorbar: _dereq_('./has_colorbar')
};
-},{"./attributes":158,"./defaults":160,"./draw":161,"./has_colorbar":162}],164:[function(_dereq_,module,exports){
+},{"./attributes":159,"./defaults":161,"./draw":162,"./has_colorbar":163}],165:[function(_dereq_,module,exports){
'use strict';
var colorbarAttrs = _dereq_('../colorbar/attributes');
@@ -32175,7 +32192,7 @@ module.exports = function colorScaleAttrs(context, opts) {
return attrs;
};
-},{"../../lib/regex":303,"../../lib/sort_object_keys":308,"../colorbar/attributes":158,"./scales.js":172}],165:[function(_dereq_,module,exports){
+},{"../../lib/regex":315,"../../lib/sort_object_keys":320,"../colorbar/attributes":159,"./scales.js":173}],166:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -32246,7 +32263,7 @@ module.exports = function calc(gd, trace, opts) {
}
};
-},{"../../lib":287,"./helpers":168,"fast-isnumeric":33}],166:[function(_dereq_,module,exports){
+},{"../../lib":299,"./helpers":169,"fast-isnumeric":33}],167:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -32315,7 +32332,7 @@ module.exports = function crossTraceDefaults(fullData, fullLayout) {
}
};
-},{"../../lib":287,"./helpers":168}],167:[function(_dereq_,module,exports){
+},{"../../lib":299,"./helpers":169}],168:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -32432,7 +32449,7 @@ module.exports = function colorScaleDefaults(parentContIn, parentContOut, layout
}
};
-},{"../../lib":287,"../../registry":378,"../colorbar/defaults":160,"../colorbar/has_colorbar":162,"./scales":172,"fast-isnumeric":33}],168:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"../colorbar/defaults":161,"../colorbar/has_colorbar":163,"./scales":173,"fast-isnumeric":33}],169:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -32664,7 +32681,7 @@ module.exports = {
makeColorScaleFuncFromTrace: makeColorScaleFuncFromTrace
};
-},{"../../lib":287,"../color":157,"./scales":172,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],169:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"./scales":173,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":122}],170:[function(_dereq_,module,exports){
'use strict';
var scales = _dereq_('./scales');
@@ -32698,7 +32715,7 @@ module.exports = {
makeColorScaleFuncFromTrace: helpers.makeColorScaleFuncFromTrace
};
-},{"./attributes":164,"./calc":165,"./cross_trace_defaults":166,"./defaults":167,"./helpers":168,"./layout_attributes":170,"./layout_defaults":171,"./scales":172}],170:[function(_dereq_,module,exports){
+},{"./attributes":165,"./calc":166,"./cross_trace_defaults":167,"./defaults":168,"./helpers":169,"./layout_attributes":171,"./layout_defaults":172,"./scales":173}],171:[function(_dereq_,module,exports){
'use strict';
var extendFlat = _dereq_('../../lib/extend').extendFlat;
@@ -32744,7 +32761,7 @@ module.exports = {
}))
};
-},{"../../lib/extend":281,"./attributes":164,"./scales":172}],171:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"./attributes":165,"./scales":173}],172:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -32787,7 +32804,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
}
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"./defaults":167,"./layout_attributes":170}],172:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"./defaults":168,"./layout_attributes":171}],173:[function(_dereq_,module,exports){
'use strict';
var tinycolor = _dereq_('tinycolor2');
@@ -32983,7 +33000,7 @@ module.exports = {
isValid: isValidScale
};
-},{"tinycolor2":121}],173:[function(_dereq_,module,exports){
+},{"tinycolor2":122}],174:[function(_dereq_,module,exports){
'use strict';
@@ -33007,7 +33024,7 @@ module.exports = function align(v, dv, v0, v1, anchor) {
return vc;
};
-},{}],174:[function(_dereq_,module,exports){
+},{}],175:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -33036,7 +33053,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) {
return cursorset[y][x];
};
-},{"../../lib":287}],175:[function(_dereq_,module,exports){
+},{"../../lib":299}],176:[function(_dereq_,module,exports){
'use strict';
exports.selectMode = function(dragmode) {
@@ -33087,7 +33104,7 @@ exports.selectingOrDrawing = function(dragmode) {
);
};
-},{}],176:[function(_dereq_,module,exports){
+},{}],177:[function(_dereq_,module,exports){
'use strict';
var mouseOffset = _dereq_('mouse-event-offset');
@@ -33371,7 +33388,7 @@ function pointerOffset(e) {
);
}
-},{"../../lib":287,"../../plots/cartesian/constants":341,"./align":173,"./cursor":174,"./unhover":177,"has-hover":64,"has-passive-events":65,"mouse-event-offset":71}],177:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/constants":353,"./align":174,"./cursor":175,"./unhover":178,"has-hover":64,"has-passive-events":65,"mouse-event-offset":71}],178:[function(_dereq_,module,exports){
'use strict';
var Events = _dereq_('../../lib/events');
@@ -33418,7 +33435,7 @@ unhover.raw = function raw(gd, evt) {
}
};
-},{"../../lib/dom":279,"../../lib/events":280,"../../lib/throttle":311,"../fx/constants":191}],178:[function(_dereq_,module,exports){
+},{"../../lib/dom":291,"../../lib/events":292,"../../lib/throttle":323,"../fx/constants":192}],179:[function(_dereq_,module,exports){
'use strict';
exports.dash = {
@@ -33480,7 +33497,7 @@ exports.pattern = {
editType: 'style',
};
-},{}],179:[function(_dereq_,module,exports){
+},{}],180:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -34931,7 +34948,7 @@ drawing.setTextPointsScale = function(selection, xScale, yScale) {
});
};
-},{"../../components/fx/helpers":193,"../../constants/alignment":262,"../../constants/interactions":266,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../lib/svg_text_utils":310,"../../registry":378,"../../traces/scatter/make_bubble_size_func":517,"../../traces/scatter/subtypes":525,"../color":157,"../colorscale":169,"./symbol_defs":180,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],180:[function(_dereq_,module,exports){
+},{"../../components/fx/helpers":194,"../../constants/alignment":274,"../../constants/interactions":278,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../lib/svg_text_utils":322,"../../registry":387,"../../traces/scatter/make_bubble_size_func":526,"../../traces/scatter/subtypes":534,"../color":158,"../colorscale":170,"./symbol_defs":181,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":122}],181:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -35486,7 +35503,7 @@ module.exports = {
}
};
-},{"@plotly/d3":20}],181:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],182:[function(_dereq_,module,exports){
'use strict';
@@ -35569,7 +35586,7 @@ module.exports = {
}
};
-},{}],182:[function(_dereq_,module,exports){
+},{}],183:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -35647,7 +35664,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) {
baseExtremes.max = baseExtremes.max.concat(extremes.max);
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"./compute_error":183,"fast-isnumeric":33}],183:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./compute_error":184,"fast-isnumeric":33}],184:[function(_dereq_,module,exports){
'use strict';
@@ -35739,7 +35756,7 @@ function makeComputeErrorValue(type, value) {
}
}
-},{}],184:[function(_dereq_,module,exports){
+},{}],185:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -35806,7 +35823,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) {
}
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378,"./attributes":181,"fast-isnumeric":33}],185:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"./attributes":182,"fast-isnumeric":33}],186:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -35867,7 +35884,7 @@ function hoverInfo(calcPoint, trace, hoverPoint) {
}
}
-},{"../../lib":287,"../../plot_api/edit_types":316,"./attributes":181,"./calc":182,"./compute_error":183,"./defaults":184,"./plot":186,"./style":187}],186:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/edit_types":328,"./attributes":182,"./calc":183,"./compute_error":184,"./defaults":185,"./plot":187,"./style":188}],187:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -36030,7 +36047,7 @@ function errorCoords(d, xa, ya) {
return out;
}
-},{"../../traces/scatter/subtypes":525,"../drawing":179,"@plotly/d3":20,"fast-isnumeric":33}],187:[function(_dereq_,module,exports){
+},{"../../traces/scatter/subtypes":534,"../drawing":180,"@plotly/d3":20,"fast-isnumeric":33}],188:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -36058,7 +36075,7 @@ module.exports = function style(traces) {
});
};
-},{"../color":157,"@plotly/d3":20}],188:[function(_dereq_,module,exports){
+},{"../color":158,"@plotly/d3":20}],189:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -36083,7 +36100,7 @@ module.exports = {
}
};
-},{"../../lib/extend":281,"../../plots/font_attributes":365,"./layout_attributes":198}],189:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/font_attributes":374,"./layout_attributes":199}],190:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -36134,7 +36151,7 @@ function paste(traceAttr, cd, cdAttr, fn) {
}
}
-},{"../../lib":287,"../../registry":378}],190:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],191:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -36163,7 +36180,7 @@ module.exports = function click(gd, evt, subplot) {
}
};
-},{"../../registry":378,"./hover":194}],191:[function(_dereq_,module,exports){
+},{"../../registry":387,"./hover":195}],192:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -36187,7 +36204,7 @@ module.exports = {
HOVERID: '-hover'
};
-},{}],192:[function(_dereq_,module,exports){
+},{}],193:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -36205,7 +36222,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
handleHoverLabelDefaults(traceIn, traceOut, coerce, opts);
};
-},{"../../lib":287,"./attributes":188,"./hoverlabel_defaults":195}],193:[function(_dereq_,module,exports){
+},{"../../lib":299,"./attributes":189,"./hoverlabel_defaults":196}],194:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -36459,7 +36476,7 @@ exports.isXYhover = function(hovermode) {
return !!xyHoverMode[hovermode];
};
-},{"../../lib":287}],194:[function(_dereq_,module,exports){
+},{"../../lib":299}],195:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -38601,7 +38618,7 @@ function getBoundingClientRect(gd, node) {
};
}
-},{"../../lib":287,"../../lib/events":280,"../../lib/override_cursor":298,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"../legend/defaults":209,"../legend/draw":210,"./constants":191,"./helpers":193,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],195:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/events":292,"../../lib/override_cursor":310,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../legend/defaults":210,"../legend/draw":211,"./constants":192,"./helpers":194,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":122}],196:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38641,7 +38658,7 @@ module.exports = function handleHoverLabelDefaults(contIn, contOut, coerce, opts
coerce('hoverlabel.align', opts.align);
};
-},{"../../lib":287,"../color":157,"./helpers":193}],196:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"./helpers":194}],197:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38659,7 +38676,7 @@ module.exports = function handleHoverModeDefaults(layoutIn, layoutOut) {
return coerce('hovermode');
};
-},{"../../lib":287,"./layout_attributes":198}],197:[function(_dereq_,module,exports){
+},{"../../lib":299,"./layout_attributes":199}],198:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -38730,7 +38747,7 @@ function castHoverinfo(trace, fullLayout, ptNumber) {
return Lib.castOption(trace, ptNumber, 'hoverinfo', _coerce);
}
-},{"../../lib":287,"../dragelement":176,"./attributes":188,"./calc":189,"./click":190,"./constants":191,"./defaults":192,"./helpers":193,"./hover":194,"./layout_attributes":198,"./layout_defaults":199,"./layout_global_defaults":200,"@plotly/d3":20}],198:[function(_dereq_,module,exports){
+},{"../../lib":299,"../dragelement":177,"./attributes":189,"./calc":190,"./click":191,"./constants":192,"./defaults":193,"./helpers":194,"./hover":195,"./layout_attributes":199,"./layout_defaults":200,"./layout_global_defaults":201,"@plotly/d3":20}],199:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -38824,7 +38841,7 @@ module.exports = {
}
};
-},{"../../plots/font_attributes":365,"./constants":191}],199:[function(_dereq_,module,exports){
+},{"../../plots/font_attributes":374,"./constants":192}],200:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38865,7 +38882,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
Lib.coerceFont(coerce, 'hoverlabel.grouptitlefont', layoutOut.hoverlabel.font);
};
-},{"../../lib":287,"./hoverlabel_defaults":195,"./hovermode_defaults":196,"./layout_attributes":198}],200:[function(_dereq_,module,exports){
+},{"../../lib":299,"./hoverlabel_defaults":196,"./hovermode_defaults":197,"./layout_attributes":199}],201:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38880,7 +38897,7 @@ module.exports = function supplyLayoutGlobalDefaults(layoutIn, layoutOut) {
handleHoverLabelDefaults(layoutIn, layoutOut, coerce);
};
-},{"../../lib":287,"./hoverlabel_defaults":195,"./layout_attributes":198}],201:[function(_dereq_,module,exports){
+},{"../../lib":299,"./hoverlabel_defaults":196,"./layout_attributes":199}],202:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -39223,7 +39240,7 @@ module.exports = {
contentDefaults: contentDefaults
};
-},{"../../lib":287,"../../lib/regex":303,"../../plot_api/plot_template":323,"../../plots/cartesian/constants":341,"../../plots/domain":364}],202:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/regex":315,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353,"../../plots/domain":373}],203:[function(_dereq_,module,exports){
'use strict';
var cartesianConstants = _dereq_('../../plots/cartesian/constants');
@@ -39325,7 +39342,7 @@ module.exports = templatedArray('image', {
editType: 'arraydraw'
});
-},{"../../constants/axis_placeable_objects":263,"../../plot_api/plot_template":323,"../../plots/cartesian/constants":341}],203:[function(_dereq_,module,exports){
+},{"../../constants/axis_placeable_objects":275,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353}],204:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -39397,7 +39414,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) {
}
};
-},{"../../lib/to_log_range":312,"fast-isnumeric":33}],204:[function(_dereq_,module,exports){
+},{"../../lib/to_log_range":324,"fast-isnumeric":33}],205:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -39454,7 +39471,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) {
return imageOut;
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"./attributes":202}],205:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":203}],206:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -39704,7 +39721,7 @@ module.exports = function draw(gd) {
}
};
-},{"../../constants/xmlns_namespaces":268,"../../plots/cartesian/axes":334,"../../plots/cartesian/axis_ids":338,"../drawing":179,"@plotly/d3":20}],206:[function(_dereq_,module,exports){
+},{"../../constants/xmlns_namespaces":280,"../../plots/cartesian/axes":346,"../../plots/cartesian/axis_ids":350,"../drawing":180,"@plotly/d3":20}],207:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -39720,7 +39737,7 @@ module.exports = {
convertCoords: _dereq_('./convert_coords')
};
-},{"../../plots/cartesian/include_components":347,"./attributes":202,"./convert_coords":203,"./defaults":204,"./draw":205}],207:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/include_components":357,"./attributes":203,"./convert_coords":204,"./defaults":205,"./draw":206}],208:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -39849,7 +39866,7 @@ module.exports = {
editType: 'legend'
};
-},{"../../plots/font_attributes":365,"../color/attributes":156}],208:[function(_dereq_,module,exports){
+},{"../../plots/font_attributes":374,"../color/attributes":157}],209:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -39865,7 +39882,7 @@ module.exports = {
itemGap: 5
};
-},{}],209:[function(_dereq_,module,exports){
+},{}],210:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -40015,7 +40032,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
}
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/attributes":330,"../../plots/layout_attributes":369,"../../registry":378,"./attributes":207,"./helpers":213}],210:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/attributes":342,"../../plots/layout_attributes":378,"../../registry":387,"./attributes":208,"./helpers":214}],211:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -40854,7 +40871,7 @@ function getYanchor(legendObj) {
'top';
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/events":280,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"./constants":208,"./get_legend_data":211,"./handle_click":212,"./helpers":213,"./style":215,"@plotly/d3":20}],211:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/events":292,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"./constants":209,"./get_legend_data":212,"./handle_click":213,"./helpers":214,"./style":216,"@plotly/d3":20}],212:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -41030,7 +41047,7 @@ module.exports = function getLegendData(calcdata, opts) {
return legendData;
};
-},{"../../registry":378,"./helpers":213}],212:[function(_dereq_,module,exports){
+},{"../../registry":387,"./helpers":214}],213:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -41272,7 +41289,7 @@ module.exports = function handleClick(g, gd, numClicks) {
}
};
-},{"../../lib":287,"../../registry":378}],213:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],214:[function(_dereq_,module,exports){
'use strict';
exports.isGrouped = function isGrouped(legendLayout) {
@@ -41287,7 +41304,7 @@ exports.isReversed = function isReversed(legendLayout) {
return (legendLayout.traceorder || '').indexOf('reversed') !== -1;
};
-},{}],214:[function(_dereq_,module,exports){
+},{}],215:[function(_dereq_,module,exports){
'use strict';
@@ -41302,7 +41319,7 @@ module.exports = {
style: _dereq_('./style')
};
-},{"./attributes":207,"./defaults":209,"./draw":210,"./style":215}],215:[function(_dereq_,module,exports){
+},{"./attributes":208,"./defaults":210,"./draw":211,"./style":216}],216:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -41993,7 +42010,7 @@ function dimAttr(v, dflt, max) {
return v;
}
-},{"../../lib":287,"../../registry":378,"../../traces/pie/helpers":492,"../../traces/pie/style_one":498,"../../traces/scatter/subtypes":525,"../color":157,"../colorscale/helpers":168,"../drawing":179,"./constants":208,"@plotly/d3":20}],216:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"../../traces/pie/helpers":501,"../../traces/pie/style_one":507,"../../traces/scatter/subtypes":534,"../color":158,"../colorscale/helpers":169,"../drawing":180,"./constants":209,"@plotly/d3":20}],217:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -42037,7 +42054,7 @@ module.exports = {
}
};
-},{"./constants":218}],217:[function(_dereq_,module,exports){
+},{"./constants":219}],218:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -42789,7 +42806,7 @@ function resetView(gd, subplotType) {
Registry.call('_guiRelayout', gd, aObj);
}
-},{"../../fonts/ploticon":270,"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../plots/plots":371,"../../registry":378,"../shapes/draw":241}],218:[function(_dereq_,module,exports){
+},{"../../fonts/ploticon":282,"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../shapes/draw":253}],219:[function(_dereq_,module,exports){
'use strict';
var modeBarButtons = _dereq_('./buttons');
@@ -42832,7 +42849,7 @@ module.exports = {
foreButtons: foreButtons
};
-},{"./buttons":217}],219:[function(_dereq_,module,exports){
+},{"./buttons":218}],220:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -42858,7 +42875,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
coerce('remove');
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../color":157,"./attributes":216}],220:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../color":158,"./attributes":217}],221:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -42871,7 +42888,7 @@ module.exports = {
manage: _dereq_('./manage')
};
-},{"./attributes":216,"./defaults":219,"./manage":221}],221:[function(_dereq_,module,exports){
+},{"./attributes":217,"./defaults":220,"./manage":222}],222:[function(_dereq_,module,exports){
'use strict';
var axisIds = _dereq_('../../plots/cartesian/axis_ids');
@@ -43230,7 +43247,7 @@ function fillCustomButton(originalModeBarButtons) {
return customButtons;
}
-},{"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../registry":378,"../../traces/scatter/subtypes":525,"../fx/helpers":193,"./buttons":217,"./constants":218,"./modebar":222}],222:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../registry":387,"../../traces/scatter/subtypes":534,"../fx/helpers":194,"./buttons":218,"./constants":219,"./modebar":223}],223:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -43573,7 +43590,7 @@ function createModeBar(gd, buttons) {
module.exports = createModeBar;
-},{"../../fonts/ploticon":270,"../../lib":287,"../../version":552,"@plotly/d3":20,"fast-isnumeric":33}],223:[function(_dereq_,module,exports){
+},{"../../fonts/ploticon":282,"../../lib":299,"../../version":561,"@plotly/d3":20,"fast-isnumeric":33}],224:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -43671,7 +43688,7 @@ module.exports = {
editType: 'plot'
};
-},{"../../plot_api/plot_template":323,"../../plots/font_attributes":365,"../color/attributes":156}],224:[function(_dereq_,module,exports){
+},{"../../plot_api/plot_template":335,"../../plots/font_attributes":374,"../color/attributes":157}],225:[function(_dereq_,module,exports){
'use strict';
@@ -43692,7 +43709,7 @@ module.exports = {
darkAmount: 10
};
-},{}],225:[function(_dereq_,module,exports){
+},{}],226:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -43776,7 +43793,7 @@ function getPosDflt(containerOut, layout, counterAxes) {
return [containerOut.domain[0], posY + constants.yPad];
}
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/array_container_defaults":329,"../color":157,"./attributes":223,"./constants":224}],226:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/array_container_defaults":341,"../color":158,"./attributes":224,"./constants":225}],227:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -44023,7 +44040,7 @@ function reposition(gd, buttons, opts, axName, selector) {
selector.attr('transform', strTranslate(lx, ly));
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axis_ids":338,"../../plots/plots":371,"../../registry":378,"../color":157,"../drawing":179,"./constants":224,"./get_update_object":227,"@plotly/d3":20}],227:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../color":158,"../drawing":180,"./constants":225,"./get_update_object":228,"@plotly/d3":20}],228:[function(_dereq_,module,exports){
'use strict';
var d3Time = _dereq_('d3-time');
@@ -44072,7 +44089,7 @@ function getXRange(axisLayout, buttonLayout) {
return [range0, range1];
}
-},{"../../lib":287,"d3-time":32}],228:[function(_dereq_,module,exports){
+},{"../../lib":299,"d3-time":32}],229:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -44091,7 +44108,7 @@ module.exports = {
draw: _dereq_('./draw')
};
-},{"./attributes":223,"./defaults":225,"./draw":226}],229:[function(_dereq_,module,exports){
+},{"./attributes":224,"./defaults":226,"./draw":227}],230:[function(_dereq_,module,exports){
'use strict';
var colorAttributes = _dereq_('../color/attributes');
@@ -44143,7 +44160,7 @@ module.exports = {
editType: 'calc'
};
-},{"../color/attributes":156}],230:[function(_dereq_,module,exports){
+},{"../color/attributes":157}],231:[function(_dereq_,module,exports){
'use strict';
var listAxes = _dereq_('../../plots/cartesian/axis_ids').list;
@@ -44169,7 +44186,7 @@ module.exports = function calcAutorange(gd) {
}
};
-},{"../../plots/cartesian/autorange":333,"../../plots/cartesian/axis_ids":338,"./constants":231}],231:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/autorange":345,"../../plots/cartesian/axis_ids":350,"./constants":232}],232:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -44217,7 +44234,7 @@ module.exports = {
extraPad: 15
};
-},{}],232:[function(_dereq_,module,exports){
+},{}],233:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -44295,7 +44312,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) {
containerOut._input = containerIn;
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/cartesian/axis_ids":338,"./attributes":229,"./oppaxis_attributes":236}],233:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/cartesian/axis_ids":350,"./attributes":230,"./oppaxis_attributes":237}],234:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -44931,7 +44948,7 @@ function drawGrabbers(rangeSlider, gd, axisOpts, opts) {
grabAreaMax.attr('height', opts._height);
}
-},{"../../lib":287,"../../lib/setcursor":307,"../../plots/cartesian":348,"../../plots/cartesian/axis_ids":338,"../../plots/plots":371,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"../titles":255,"./constants":231,"@plotly/d3":20}],234:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/setcursor":319,"../../plots/cartesian":358,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../titles":267,"./constants":232,"@plotly/d3":20}],235:[function(_dereq_,module,exports){
'use strict';
var axisIDs = _dereq_('../../plots/cartesian/axis_ids');
@@ -44998,7 +45015,7 @@ exports.autoMarginOpts = function(gd, ax) {
};
};
-},{"../../constants/alignment":262,"../../lib/svg_text_utils":310,"../../plots/cartesian/axis_ids":338,"./constants":231}],235:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib/svg_text_utils":322,"../../plots/cartesian/axis_ids":350,"./constants":232}],236:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -45029,7 +45046,7 @@ module.exports = {
autoMarginOpts: helpers.autoMarginOpts
};
-},{"../../lib":287,"./attributes":229,"./calc_autorange":230,"./defaults":232,"./draw":233,"./helpers":234,"./oppaxis_attributes":236}],236:[function(_dereq_,module,exports){
+},{"../../lib":299,"./attributes":230,"./calc_autorange":231,"./defaults":233,"./draw":234,"./helpers":235,"./oppaxis_attributes":237}],237:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -45055,7 +45072,2195 @@ module.exports = {
editType: 'calc'
};
-},{}],237:[function(_dereq_,module,exports){
+},{}],238:[function(_dereq_,module,exports){
+'use strict';
+
+var annAttrs = _dereq_('../annotations/attributes');
+var scatterLineAttrs = _dereq_('../../traces/scatter/attributes').line;
+var dash = _dereq_('../drawing/attributes').dash;
+var extendFlat = _dereq_('../../lib/extend').extendFlat;
+var overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;
+var templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;
+var axisPlaceableObjs = _dereq_('../../constants/axis_placeable_objects');
+
+module.exports = overrideAll(templatedArray('selection', {
+ type: {
+ valType: 'enumerated',
+ values: ['rect', 'path'],
+ },
+
+ xref: extendFlat({}, annAttrs.xref, {
+ }),
+
+ yref: extendFlat({}, annAttrs.yref, {
+ }),
+
+ x0: {
+ valType: 'any',
+ },
+ x1: {
+ valType: 'any',
+ },
+
+ y0: {
+ valType: 'any',
+ },
+ y1: {
+ valType: 'any',
+ },
+
+ path: {
+ valType: 'string',
+ editType: 'arraydraw',
+ },
+
+ opacity: {
+ valType: 'number',
+ min: 0,
+ max: 1,
+ dflt: 0.7,
+ editType: 'arraydraw',
+ },
+
+ line: {
+ color: scatterLineAttrs.color,
+ width: extendFlat({}, scatterLineAttrs.width, {
+ min: 1,
+ dflt: 1
+ }),
+ dash: extendFlat({}, dash, {
+ dflt: 'dot'
+ })
+ },
+}), 'arraydraw', 'from-root');
+
+},{"../../constants/axis_placeable_objects":275,"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../traces/scatter/attributes":509,"../annotations/attributes":141,"../drawing/attributes":179}],239:[function(_dereq_,module,exports){
+'use strict';
+
+module.exports = {
+ // max pixels off straight before a lasso select line counts as bent
+ BENDPX: 1.5,
+
+ // smallest dimension allowed for a select box
+ MINSELECT: 12,
+
+ // throttling limit (ms) for selectPoints calls
+ SELECTDELAY: 100,
+
+ // cache ID suffix for throttle
+ SELECTID: '-select',
+};
+
+},{}],240:[function(_dereq_,module,exports){
+'use strict';
+
+var Lib = _dereq_('../../lib');
+var Axes = _dereq_('../../plots/cartesian/axes');
+var handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');
+
+var attributes = _dereq_('./attributes');
+var helpers = _dereq_('../shapes/helpers');
+
+module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
+ handleArrayContainerDefaults(layoutIn, layoutOut, {
+ name: 'selections',
+ handleItemDefaults: handleSelectionDefaults
+ });
+
+ // Drop rect selections with undefined x0, y0, x1, x1 values.
+ // In future we may accept partially defined rects e.g.
+ // a case with only x0 and x1 may be used to define
+ // [-Infinity, +Infinity] range on the y axis, etc.
+ var selections = layoutOut.selections;
+ for(var i = 0; i < selections.length; i++) {
+ var selection = selections[i];
+ if(!selection) continue;
+ if(selection.path === undefined) {
+ if(
+ selection.x0 === undefined ||
+ selection.x1 === undefined ||
+ selection.y0 === undefined ||
+ selection.y1 === undefined
+ ) {
+ layoutOut.selections[i] = null;
+ }
+ }
+ }
+};
+
+function handleSelectionDefaults(selectionIn, selectionOut, fullLayout) {
+ function coerce(attr, dflt) {
+ return Lib.coerce(selectionIn, selectionOut, attributes, attr, dflt);
+ }
+
+ var path = coerce('path');
+ var dfltType = path ? 'path' : 'rect';
+ var selectionType = coerce('type', dfltType);
+ var noPath = selectionType !== 'path';
+ if(noPath) delete selectionOut.path;
+
+ coerce('opacity');
+ coerce('line.color');
+ coerce('line.width');
+ coerce('line.dash');
+
+ // positioning
+ var axLetters = ['x', 'y'];
+ for(var i = 0; i < 2; i++) {
+ var axLetter = axLetters[i];
+ var gdMock = {_fullLayout: fullLayout};
+ var ax;
+ var pos2r;
+ var r2pos;
+
+ // xref, yref
+ var axRef = Axes.coerceRef(selectionIn, selectionOut, gdMock, axLetter);
+
+ // axRefType is 'range' for selections
+ ax = Axes.getFromId(gdMock, axRef);
+ ax._selectionIndices.push(selectionOut._index);
+ r2pos = helpers.rangeToShapePosition(ax);
+ pos2r = helpers.shapePositionToRange(ax);
+
+ // Coerce x0, x1, y0, y1
+ if(noPath) {
+ // hack until V3.0 when log has regular range behavior - make it look like other
+ // ranges to send to coerce, then put it back after
+ // this is all to give reasonable default position behavior on log axes, which is
+ // a pretty unimportant edge case so we could just ignore this.
+ var attr0 = axLetter + '0';
+ var attr1 = axLetter + '1';
+ var in0 = selectionIn[attr0];
+ var in1 = selectionIn[attr1];
+ selectionIn[attr0] = pos2r(selectionIn[attr0], true);
+ selectionIn[attr1] = pos2r(selectionIn[attr1], true);
+
+ Axes.coercePosition(selectionOut, gdMock, coerce, axRef, attr0);
+ Axes.coercePosition(selectionOut, gdMock, coerce, axRef, attr1);
+
+ var p0 = selectionOut[attr0];
+ var p1 = selectionOut[attr1];
+
+ if(p0 !== undefined && p1 !== undefined) {
+ // hack part 2
+ selectionOut[attr0] = r2pos(p0);
+ selectionOut[attr1] = r2pos(p1);
+ selectionIn[attr0] = in0;
+ selectionIn[attr1] = in1;
+ }
+ }
+ }
+
+ if(noPath) {
+ Lib.noneOrAll(selectionIn, selectionOut, ['x0', 'x1', 'y0', 'y1']);
+ }
+}
+
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"../shapes/helpers":260,"./attributes":238}],241:[function(_dereq_,module,exports){
+'use strict';
+
+var readPaths = _dereq_('../shapes/draw_newshape/helpers').readPaths;
+var displayOutlines = _dereq_('../shapes/display_outlines');
+
+var clearOutlineControllers = _dereq_('../shapes/handle_outline').clearOutlineControllers;
+
+var Color = _dereq_('../color');
+var Drawing = _dereq_('../drawing');
+var arrayEditor = _dereq_('../../plot_api/plot_template').arrayEditor;
+
+var helpers = _dereq_('../shapes/helpers');
+var getPathString = helpers.getPathString;
+
+
+// Selections are stored in gd.layout.selections, an array of objects
+// index can point to one item in this array,
+// or non-numeric to simply add a new one
+// or -1 to modify all existing
+// opt can be the full options object, or one key (to be set to value)
+// or undefined to simply redraw
+// if opt is blank, val can be 'add' or a full options object to add a new
+// annotation at that point in the array, or 'remove' to delete this one
+
+module.exports = {
+ draw: draw,
+ drawOne: drawOne,
+ activateLastSelection: activateLastSelection
+};
+
+function draw(gd) {
+ var fullLayout = gd._fullLayout;
+
+ clearOutlineControllers(gd);
+
+ // Remove previous selections before drawing new selections in fullLayout.selections
+ fullLayout._selectionLayer.selectAll('path').remove();
+
+ for(var k in fullLayout._plots) {
+ var selectionLayer = fullLayout._plots[k].selectionLayer;
+ if(selectionLayer) selectionLayer.selectAll('path').remove();
+ }
+
+ for(var i = 0; i < fullLayout.selections.length; i++) {
+ drawOne(gd, i);
+ }
+}
+
+function drawOne(gd, index) {
+ // remove the existing selection if there is one.
+ // because indices can change, we need to look in all selection layers
+ gd._fullLayout._paperdiv
+ .selectAll('.selectionlayer [data-index="' + index + '"]')
+ .remove();
+
+ var o = helpers.makeSelectionsOptionsAndPlotinfo(gd, index);
+ var options = o.options;
+ var plotinfo = o.plotinfo;
+
+ // this selection is gone - quit now after deleting it
+ // TODO: use d3 idioms instead of deleting and redrawing every time
+ if(!options._input) return;
+
+ drawSelection(gd._fullLayout._selectionLayer);
+
+ function drawSelection(selectionLayer) {
+ var d = getPathString(gd, options);
+ var attrs = {
+ 'data-index': index,
+ 'fill-rule': 'evenodd',
+ d: d
+ };
+
+ var opacity = options.opacity;
+ var fillColor = 'rgba(0,0,0,0)';
+ var lineColor = options.line.color || Color.contrast(gd._fullLayout.plot_bgcolor);
+ var lineWidth = options.line.width;
+ var lineDash = options.line.dash;
+ if(!lineWidth) {
+ // ensure invisible border to activate the selection
+ lineWidth = 5;
+ lineDash = 'solid';
+ }
+
+ var isActiveSelection =
+ gd._fullLayout._activeSelectionIndex === index;
+
+ if(isActiveSelection) {
+ fillColor = gd._fullLayout.activeselection.fillcolor;
+ opacity = gd._fullLayout.activeselection.opacity;
+ }
+
+ var allPaths = [];
+ for(var sensory = 1; sensory >= 0; sensory--) {
+ var path = selectionLayer.append('path')
+ .attr(attrs)
+ .style('opacity', sensory ? 0.1 : opacity)
+ .call(Color.stroke, lineColor)
+ .call(Color.fill, fillColor)
+ // make it easier to select senory background path
+ .call(Drawing.dashLine,
+ sensory ? 'solid' : lineDash,
+ sensory ? 4 + lineWidth : lineWidth
+ );
+
+ setClipPath(path, gd, options);
+
+ if(isActiveSelection) {
+ var editHelpers = arrayEditor(gd.layout, 'selections', options);
+
+ path.style({
+ 'cursor': 'move',
+ });
+
+ var dragOptions = {
+ element: path.node(),
+ plotinfo: plotinfo,
+ gd: gd,
+ editHelpers: editHelpers,
+ isActiveSelection: true // i.e. to enable controllers
+ };
+
+ var polygons = readPaths(d, gd);
+ // display polygons on the screen
+ displayOutlines(polygons, path, dragOptions);
+ } else {
+ path.style('pointer-events', sensory ? 'all' : 'none');
+ }
+
+ allPaths[sensory] = path;
+ }
+
+ var forePath = allPaths[0];
+ var backPath = allPaths[1];
+
+ backPath.node().addEventListener('click', function() { return activateSelection(gd, forePath); });
+ }
+}
+
+function setClipPath(selectionPath, gd, selectionOptions) {
+ var clipAxes = selectionOptions.xref + selectionOptions.yref;
+
+ Drawing.setClipUrl(
+ selectionPath,
+ 'clip' + gd._fullLayout._uid + clipAxes,
+ gd
+ );
+}
+
+
+function activateSelection(gd, path) {
+ var element = path.node();
+ var id = +element.getAttribute('data-index');
+ if(id >= 0) {
+ // deactivate if already active
+ if(id === gd._fullLayout._activeSelectionIndex) {
+ deactivateSelection(gd);
+ return;
+ }
+
+ gd._fullLayout._activeSelectionIndex = id;
+ gd._fullLayout._deactivateSelection = deactivateSelection;
+ draw(gd);
+ }
+}
+
+function activateLastSelection(gd) {
+ var id = gd._fullLayout.selections.length - 1;
+ gd._fullLayout._activeSelectionIndex = id;
+ gd._fullLayout._deactivateSelection = deactivateSelection;
+ draw(gd);
+}
+
+function deactivateSelection(gd) {
+ var id = gd._fullLayout._activeSelectionIndex;
+ if(id >= 0) {
+ clearOutlineControllers(gd);
+ delete gd._fullLayout._activeSelectionIndex;
+ draw(gd);
+ }
+}
+
+},{"../../plot_api/plot_template":335,"../color":158,"../drawing":180,"../shapes/display_outlines":252,"../shapes/draw_newshape/helpers":257,"../shapes/handle_outline":259,"../shapes/helpers":260}],242:[function(_dereq_,module,exports){
+'use strict';
+
+var dash = _dereq_('../../drawing/attributes').dash;
+var extendFlat = _dereq_('../../../lib/extend').extendFlat;
+
+module.exports = {
+ newselection: {
+ mode: {
+ valType: 'enumerated',
+ values: ['immediate', 'gradual'],
+ dflt: 'immediate',
+ editType: 'none',
+ },
+
+ line: {
+ color: {
+ valType: 'color',
+ editType: 'none',
+ },
+ width: {
+ valType: 'number',
+ min: 1,
+ dflt: 1,
+ editType: 'none',
+ },
+ dash: extendFlat({}, dash, {
+ dflt: 'dot',
+ editType: 'none'
+ }),
+ editType: 'none'
+ },
+
+ // no drawdirection here noting that layout.selectdirection is used instead.
+
+ editType: 'none'
+ },
+
+ activeselection: {
+ fillcolor: {
+ valType: 'color',
+ dflt: 'rgba(0,0,0,0)',
+ editType: 'none',
+ },
+ opacity: {
+ valType: 'number',
+ min: 0,
+ max: 1,
+ dflt: 0.5,
+ editType: 'none',
+ },
+ editType: 'none'
+ }
+};
+
+},{"../../../lib/extend":293,"../../drawing/attributes":179}],243:[function(_dereq_,module,exports){
+'use strict';
+
+module.exports = function supplyDrawNewSelectionDefaults(layoutIn, layoutOut, coerce) {
+ coerce('newselection.mode');
+
+ var newselectionLineWidth = coerce('newselection.line.width');
+ if(newselectionLineWidth) {
+ coerce('newselection.line.color');
+ coerce('newselection.line.dash');
+ }
+
+ coerce('activeselection.fillcolor');
+ coerce('activeselection.opacity');
+};
+
+},{}],244:[function(_dereq_,module,exports){
+'use strict';
+
+var dragHelpers = _dereq_('../../dragelement/helpers');
+var selectMode = dragHelpers.selectMode;
+
+var handleOutline = _dereq_('../../shapes/handle_outline');
+var clearOutline = handleOutline.clearOutline;
+
+var helpers = _dereq_('../../shapes/draw_newshape/helpers');
+var readPaths = helpers.readPaths;
+var writePaths = helpers.writePaths;
+var fixDatesForPaths = helpers.fixDatesForPaths;
+
+module.exports = function newSelections(outlines, dragOptions) {
+ if(!outlines.length) return;
+ var e = outlines[0][0]; // pick first
+ if(!e) return;
+ var d = e.getAttribute('d');
+
+ var gd = dragOptions.gd;
+ var newStyle = gd._fullLayout.newselection;
+
+ var plotinfo = dragOptions.plotinfo;
+ var xaxis = plotinfo.xaxis;
+ var yaxis = plotinfo.yaxis;
+
+ var isActiveSelection = dragOptions.isActiveSelection;
+ var dragmode = dragOptions.dragmode;
+
+ var selections = (gd.layout || {}).selections || [];
+
+ if(!selectMode(dragmode) && isActiveSelection !== undefined) {
+ var id = gd._fullLayout._activeSelectionIndex;
+ if(id < selections.length) {
+ switch(gd._fullLayout.selections[id].type) {
+ case 'rect':
+ dragmode = 'select';
+ break;
+ case 'path':
+ dragmode = 'lasso';
+ break;
+ }
+ }
+ }
+
+ var polygons = readPaths(d, gd, plotinfo, isActiveSelection);
+
+ var newSelection = {
+ xref: xaxis._id,
+ yref: yaxis._id,
+
+ opacity: newStyle.opacity,
+ line: {
+ color: newStyle.line.color,
+ width: newStyle.line.width,
+ dash: newStyle.line.dash
+ }
+ };
+
+ var cell;
+ // rect can be in one cell
+ // only define cell if there is single cell
+ if(polygons.length === 1) cell = polygons[0];
+
+ if(
+ cell &&
+ cell.length === 5 && // ensure we only have 4 corners for a rect
+ dragmode === 'select'
+ ) {
+ newSelection.type = 'rect';
+ newSelection.x0 = cell[0][1];
+ newSelection.y0 = cell[0][2];
+ newSelection.x1 = cell[2][1];
+ newSelection.y1 = cell[2][2];
+ } else {
+ newSelection.type = 'path';
+ if(xaxis && yaxis) fixDatesForPaths(polygons, xaxis, yaxis);
+ newSelection.path = writePaths(polygons);
+ cell = null;
+ }
+
+ clearOutline(gd);
+
+ var editHelpers = dragOptions.editHelpers;
+ var modifyItem = (editHelpers || {}).modifyItem;
+
+ var allSelections = [];
+ for(var q = 0; q < selections.length; q++) {
+ var beforeEdit = gd._fullLayout.selections[q];
+ if(!beforeEdit) {
+ allSelections[q] = beforeEdit;
+ continue;
+ }
+
+ allSelections[q] = beforeEdit._input;
+
+ if(
+ isActiveSelection !== undefined &&
+ q === gd._fullLayout._activeSelectionIndex
+ ) {
+ var afterEdit = newSelection;
+
+ switch(beforeEdit.type) {
+ case 'rect':
+ modifyItem('x0', afterEdit.x0);
+ modifyItem('x1', afterEdit.x1);
+ modifyItem('y0', afterEdit.y0);
+ modifyItem('y1', afterEdit.y1);
+ break;
+
+ case 'path':
+ modifyItem('path', afterEdit.path);
+ break;
+ }
+ }
+ }
+
+ if(isActiveSelection === undefined) {
+ allSelections.push(newSelection); // add new selection
+ return allSelections;
+ }
+
+ return editHelpers ? editHelpers.getUpdateObj() : {};
+};
+
+},{"../../dragelement/helpers":176,"../../shapes/draw_newshape/helpers":257,"../../shapes/handle_outline":259}],245:[function(_dereq_,module,exports){
+'use strict';
+
+var strTranslate = _dereq_('../../lib').strTranslate;
+
+// in v3 (once log ranges are fixed),
+// we'll be able to p2r here for all axis types
+function p2r(ax, v) {
+ switch(ax.type) {
+ case 'log':
+ return ax.p2d(v);
+ case 'date':
+ return ax.p2r(v, 0, ax.calendar);
+ default:
+ return ax.p2r(v);
+ }
+}
+
+function r2p(ax, v) {
+ switch(ax.type) {
+ case 'log':
+ return ax.d2p(v);
+ case 'date':
+ return ax.r2p(v, 0, ax.calendar);
+ default:
+ return ax.r2p(v);
+ }
+}
+
+function axValue(ax) {
+ var index = (ax._id.charAt(0) === 'y') ? 1 : 0;
+ return function(v) { return p2r(ax, v[index]); };
+}
+
+function getTransform(plotinfo) {
+ return strTranslate(
+ plotinfo.xaxis._offset,
+ plotinfo.yaxis._offset
+ );
+}
+
+module.exports = {
+ p2r: p2r,
+ r2p: r2p,
+ axValue: axValue,
+ getTransform: getTransform
+};
+
+},{"../../lib":299}],246:[function(_dereq_,module,exports){
+'use strict';
+
+var drawModule = _dereq_('./draw');
+var select = _dereq_('./select');
+
+module.exports = {
+ moduleType: 'component',
+ name: 'selections',
+
+ layoutAttributes: _dereq_('./attributes'),
+ supplyLayoutDefaults: _dereq_('./defaults'),
+ supplyDrawNewSelectionDefaults: _dereq_('./draw_newselection/defaults'),
+ includeBasePlot: _dereq_('../../plots/cartesian/include_components')('selections'),
+
+ draw: drawModule.draw,
+ drawOne: drawModule.drawOne,
+
+ reselect: select.reselect,
+ prepSelect: select.prepSelect,
+ clearOutline: select.clearOutline,
+ clearSelectionsCache: select.clearSelectionsCache,
+ selectOnClick: select.selectOnClick
+};
+
+},{"../../plots/cartesian/include_components":357,"./attributes":238,"./defaults":240,"./draw":241,"./draw_newselection/defaults":243,"./select":247}],247:[function(_dereq_,module,exports){
+'use strict';
+
+var polybool = _dereq_('polybooljs');
+var pointInPolygon = _dereq_('point-in-polygon/nested'); // could we use contains lib/polygon instead?
+
+var Registry = _dereq_('../../registry');
+var dashStyle = _dereq_('../drawing').dashStyle;
+var Color = _dereq_('../color');
+var Fx = _dereq_('../fx');
+var makeEventData = _dereq_('../fx/helpers').makeEventData;
+var dragHelpers = _dereq_('../dragelement/helpers');
+var freeMode = dragHelpers.freeMode;
+var rectMode = dragHelpers.rectMode;
+var drawMode = dragHelpers.drawMode;
+var openMode = dragHelpers.openMode;
+var selectMode = dragHelpers.selectMode;
+
+var shapeHelpers = _dereq_('../shapes/helpers');
+var shapeConstants = _dereq_('../shapes/constants');
+
+var displayOutlines = _dereq_('../shapes/display_outlines');
+var clearOutline = _dereq_('../shapes/handle_outline').clearOutline;
+
+var newShapeHelpers = _dereq_('../shapes/draw_newshape/helpers');
+var handleEllipse = newShapeHelpers.handleEllipse;
+var readPaths = newShapeHelpers.readPaths;
+
+var newShapes = _dereq_('../shapes/draw_newshape/newshapes');
+
+var newSelections = _dereq_('./draw_newselection/newselections');
+var activateLastSelection = _dereq_('./draw').activateLastSelection;
+
+var Lib = _dereq_('../../lib');
+var ascending = Lib.sorterAsc;
+var libPolygon = _dereq_('../../lib/polygon');
+var throttle = _dereq_('../../lib/throttle');
+var getFromId = _dereq_('../../plots/cartesian/axis_ids').getFromId;
+var clearGlCanvases = _dereq_('../../lib/clear_gl_canvases');
+
+var redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;
+
+var constants = _dereq_('./constants');
+var MINSELECT = constants.MINSELECT;
+
+var filteredPolygon = libPolygon.filter;
+var polygonTester = libPolygon.tester;
+
+var helpers = _dereq_('./helpers');
+var p2r = helpers.p2r;
+var axValue = helpers.axValue;
+var getTransform = helpers.getTransform;
+
+function hasSubplot(dragOptions) {
+ // N.B. subplot may be falsy e.g zero sankey index!
+ return dragOptions.subplot !== undefined;
+}
+
+function prepSelect(evt, startX, startY, dragOptions, mode) {
+ var isCartesian = !hasSubplot(dragOptions);
+
+ var isFreeMode = freeMode(mode);
+ var isRectMode = rectMode(mode);
+ var isOpenMode = openMode(mode);
+ var isDrawMode = drawMode(mode);
+ var isSelectMode = selectMode(mode);
+
+ var isLine = mode === 'drawline';
+ var isEllipse = mode === 'drawcircle';
+ var isLineOrEllipse = isLine || isEllipse; // cases with two start & end positions
+
+ var gd = dragOptions.gd;
+ var fullLayout = gd._fullLayout;
+ var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
+ isCartesian; // N.B. only cartesian subplots have persistent selection
+
+ var zoomLayer = fullLayout._zoomlayer;
+ var dragBBox = dragOptions.element.getBoundingClientRect();
+ var plotinfo = dragOptions.plotinfo;
+ var transform = getTransform(plotinfo);
+ var x0 = startX - dragBBox.left;
+ var y0 = startY - dragBBox.top;
+
+ fullLayout._calcInverseTransform(gd);
+ var transformedCoords = Lib.apply3DTransform(fullLayout._invTransform)(x0, y0);
+ x0 = transformedCoords[0];
+ y0 = transformedCoords[1];
+ var scaleX = fullLayout._invScaleX;
+ var scaleY = fullLayout._invScaleY;
+
+ var x1 = x0;
+ var y1 = y0;
+ var path0 = 'M' + x0 + ',' + y0;
+ var xAxis = dragOptions.xaxes[0];
+ var yAxis = dragOptions.yaxes[0];
+ var pw = xAxis._length;
+ var ph = yAxis._length;
+
+ var subtract = evt.altKey &&
+ !(drawMode(mode) && isOpenMode);
+
+ var filterPoly, selectionTesters, mergedPolygons, currentPolygon;
+ var i, searchInfo, eventData;
+
+ coerceSelectionsCache(evt, gd, dragOptions);
+
+ if(isFreeMode) {
+ filterPoly = filteredPolygon([[x0, y0]], constants.BENDPX);
+ }
+
+ var outlines = zoomLayer.selectAll('path.select-outline-' + plotinfo.id).data([1]);
+ var newStyle = isDrawMode ?
+ fullLayout.newshape :
+ fullLayout.newselection;
+
+ outlines.enter()
+ .append('path')
+ .attr('class', 'select-outline select-outline-' + plotinfo.id)
+ .style({
+ opacity: isDrawMode ? newStyle.opacity / 2 : 1,
+ fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
+ stroke: newStyle.line.color || (
+ isCartesian ?
+ Color.contrast(gd._fullLayout.plot_bgcolor) :
+ '#7f7f7f' // non-cartesian subplot
+ ),
+ 'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
+ 'stroke-width': newStyle.line.width + 'px',
+ 'shape-rendering': 'crispEdges'
+ })
+ .attr('fill-rule', 'evenodd')
+ .classed('cursor-move', isDrawMode ? true : false)
+ .attr('transform', transform)
+ .attr('d', path0 + 'Z');
+
+ var corners = zoomLayer.append('path')
+ .attr('class', 'zoombox-corners')
+ .style({
+ fill: Color.background,
+ stroke: Color.defaultLine,
+ 'stroke-width': 1
+ })
+ .attr('transform', transform)
+ .attr('d', 'M0,0Z');
+
+
+ var throttleID = fullLayout._uid + constants.SELECTID;
+ var selection = [];
+
+ // find the traces to search for selection points
+ var searchTraces = determineSearchTraces(gd, dragOptions.xaxes,
+ dragOptions.yaxes, dragOptions.subplot);
+
+ if(immediateSelect && !evt.shiftKey) {
+ dragOptions._clearSubplotSelections = function() {
+ if(!isCartesian) return;
+
+ var xRef = xAxis._id;
+ var yRef = yAxis._id;
+ deselectSubplot(gd, xRef, yRef, searchTraces);
+
+ var selections = (gd.layout || {}).selections || [];
+ var list = [];
+ var selectionErased = false;
+ for(var q = 0; q < selections.length; q++) {
+ var s = fullLayout.selections[q];
+ if(
+ s.xref !== xRef ||
+ s.yref !== yRef
+ ) {
+ list.push(selections[q]);
+ } else {
+ selectionErased = true;
+ }
+ }
+
+ if(selectionErased) {
+ Registry.call('_guiRelayout', gd, {
+ selections: list
+ });
+ }
+ };
+ }
+
+ var fillRangeItems = getFillRangeItems(dragOptions);
+
+ dragOptions.moveFn = function(dx0, dy0) {
+ if(dragOptions._clearSubplotSelections) {
+ dragOptions._clearSubplotSelections();
+ dragOptions._clearSubplotSelections = undefined;
+ }
+
+ x1 = Math.max(0, Math.min(pw, scaleX * dx0 + x0));
+ y1 = Math.max(0, Math.min(ph, scaleY * dy0 + y0));
+
+ var dx = Math.abs(x1 - x0);
+ var dy = Math.abs(y1 - y0);
+
+ if(isRectMode) {
+ var direction;
+ var start, end;
+
+ if(isSelectMode) {
+ var q = fullLayout.selectdirection;
+
+ if(q === 'any') {
+ if(dy < Math.min(dx * 0.6, MINSELECT)) {
+ direction = 'h';
+ } else if(dx < Math.min(dy * 0.6, MINSELECT)) {
+ direction = 'v';
+ } else {
+ direction = 'd';
+ }
+ } else {
+ direction = q;
+ }
+
+ switch(direction) {
+ case 'h':
+ start = isEllipse ? ph / 2 : 0;
+ end = ph;
+ break;
+ case 'v':
+ start = isEllipse ? pw / 2 : 0;
+ end = pw;
+ break;
+ }
+ }
+
+ if(isDrawMode) {
+ switch(fullLayout.newshape.drawdirection) {
+ case 'vertical':
+ direction = 'h';
+ start = isEllipse ? ph / 2 : 0;
+ end = ph;
+ break;
+ case 'horizontal':
+ direction = 'v';
+ start = isEllipse ? pw / 2 : 0;
+ end = pw;
+ break;
+ case 'ortho':
+ if(dx < dy) {
+ direction = 'h';
+ start = y0;
+ end = y1;
+ } else {
+ direction = 'v';
+ start = x0;
+ end = x1;
+ }
+ break;
+ default: // i.e. case of 'diagonal'
+ direction = 'd';
+ }
+ }
+
+ if(direction === 'h') {
+ // horizontal motion
+ currentPolygon = isLineOrEllipse ?
+ handleEllipse(isEllipse, [x1, start], [x1, end]) : // using x1 instead of x0 allows adjusting the line while drawing
+ [[x0, start], [x0, end], [x1, end], [x1, start]]; // make a vertical box
+
+ currentPolygon.xmin = isLineOrEllipse ? x1 : Math.min(x0, x1);
+ currentPolygon.xmax = isLineOrEllipse ? x1 : Math.max(x0, x1);
+ currentPolygon.ymin = Math.min(start, end);
+ currentPolygon.ymax = Math.max(start, end);
+ // extras to guide users in keeping a straight selection
+ corners.attr('d', 'M' + currentPolygon.xmin + ',' + (y0 - MINSELECT) +
+ 'h-4v' + (2 * MINSELECT) + 'h4Z' +
+ 'M' + (currentPolygon.xmax - 1) + ',' + (y0 - MINSELECT) +
+ 'h4v' + (2 * MINSELECT) + 'h-4Z');
+ } else if(direction === 'v') {
+ // vertical motion
+ currentPolygon = isLineOrEllipse ?
+ handleEllipse(isEllipse, [start, y1], [end, y1]) : // using y1 instead of y0 allows adjusting the line while drawing
+ [[start, y0], [start, y1], [end, y1], [end, y0]]; // make a horizontal box
+
+ currentPolygon.xmin = Math.min(start, end);
+ currentPolygon.xmax = Math.max(start, end);
+ currentPolygon.ymin = isLineOrEllipse ? y1 : Math.min(y0, y1);
+ currentPolygon.ymax = isLineOrEllipse ? y1 : Math.max(y0, y1);
+ corners.attr('d', 'M' + (x0 - MINSELECT) + ',' + currentPolygon.ymin +
+ 'v-4h' + (2 * MINSELECT) + 'v4Z' +
+ 'M' + (x0 - MINSELECT) + ',' + (currentPolygon.ymax - 1) +
+ 'v4h' + (2 * MINSELECT) + 'v-4Z');
+ } else if(direction === 'd') {
+ // diagonal motion
+ currentPolygon = isLineOrEllipse ?
+ handleEllipse(isEllipse, [x0, y0], [x1, y1]) :
+ [[x0, y0], [x0, y1], [x1, y1], [x1, y0]];
+
+ currentPolygon.xmin = Math.min(x0, x1);
+ currentPolygon.xmax = Math.max(x0, x1);
+ currentPolygon.ymin = Math.min(y0, y1);
+ currentPolygon.ymax = Math.max(y0, y1);
+ corners.attr('d', 'M0,0Z');
+ }
+ } else if(isFreeMode) {
+ filterPoly.addPt([x1, y1]);
+ currentPolygon = filterPoly.filtered;
+ }
+
+ // create outline & tester
+ if(dragOptions.selectionDefs && dragOptions.selectionDefs.length) {
+ mergedPolygons = mergePolygons(dragOptions.mergedPolygons, currentPolygon, subtract);
+
+ currentPolygon.subtract = subtract;
+ selectionTesters = multiTester(dragOptions.selectionDefs.concat([currentPolygon]));
+ } else {
+ mergedPolygons = [currentPolygon];
+ selectionTesters = polygonTester(currentPolygon);
+ }
+
+ // display polygons on the screen
+ displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
+
+ if(isSelectMode) {
+ var _res = reselect(gd);
+ var extraPoints = _res.eventData ? _res.eventData.points.slice() : [];
+
+ _res = reselect(gd, selectionTesters, searchTraces, dragOptions);
+ selectionTesters = _res.selectionTesters;
+ eventData = _res.eventData;
+
+ var poly;
+ if(filterPoly) {
+ poly = filterPoly.filtered;
+ } else {
+ poly = castMultiPolygon(mergedPolygons);
+ }
+
+ throttle.throttle(
+ throttleID,
+ constants.SELECTDELAY,
+ function() {
+ selection = _doSelect(selectionTesters, searchTraces);
+
+ var newPoints = selection.slice();
+
+ for(var w = 0; w < extraPoints.length; w++) {
+ var p = extraPoints[w];
+ var found = false;
+ for(var u = 0; u < newPoints.length; u++) {
+ if(
+ newPoints[u].curveNumber === p.curveNumber &&
+ newPoints[u].pointNumber === p.pointNumber
+ ) {
+ found = true;
+ break;
+ }
+ }
+ if(!found) newPoints.push(p);
+ }
+
+ if(newPoints.length) {
+ if(!eventData) eventData = {};
+ eventData.points = newPoints;
+ }
+
+ fillRangeItems(eventData, poly);
+
+ emitSelecting(gd, eventData);
+ }
+ );
+ }
+ };
+
+ dragOptions.clickFn = function(numClicks, evt) {
+ corners.remove();
+
+ if(gd._fullLayout._activeShapeIndex >= 0) {
+ gd._fullLayout._deactivateShape(gd);
+ return;
+ }
+ if(isDrawMode) return;
+
+ var clickmode = fullLayout.clickmode;
+
+ throttle.done(throttleID).then(function() {
+ throttle.clear(throttleID);
+ if(numClicks === 2) {
+ // clear selection on doubleclick
+ outlines.remove();
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ searchInfo._module.selectPoints(searchInfo, false);
+ }
+
+ updateSelectedState(gd, searchTraces);
+
+ clearSelectionsCache(dragOptions);
+
+ emitDeselect(gd);
+
+ if(searchTraces.length) {
+ var clickedXaxis = searchTraces[0].xaxis;
+ var clickedYaxis = searchTraces[0].yaxis;
+
+ if(clickedXaxis && clickedYaxis) {
+ // drop selections in the clicked subplot
+ var subSelections = [];
+ var allSelections = gd._fullLayout.selections;
+ for(var k = 0; k < allSelections.length; k++) {
+ var s = allSelections[k];
+ if(!s) continue; // also drop null selections if any
+
+ if(
+ s.xref !== clickedXaxis._id ||
+ s.yref !== clickedYaxis._id
+ ) {
+ subSelections.push(s);
+ }
+ }
+
+ Registry.call('_guiRelayout', gd, {
+ selections: subSelections
+ });
+ }
+ }
+ } else {
+ if(clickmode.indexOf('select') > -1) {
+ selectOnClick(evt, gd, dragOptions.xaxes, dragOptions.yaxes,
+ dragOptions.subplot, dragOptions, outlines);
+ }
+
+ if(clickmode === 'event') {
+ // TODO: remove in v3 - this was probably never intended to work as it does,
+ // but in case anyone depends on it we don't want to break it now.
+ // Note that click-to-select introduced pre v3 also emitts proper
+ // event data when clickmode is having 'select' in its flag list.
+ emitSelected(gd, undefined);
+ }
+ }
+
+ Fx.click(gd, evt);
+ }).catch(Lib.error);
+ };
+
+ dragOptions.doneFn = function() {
+ corners.remove();
+
+ throttle.done(throttleID).then(function() {
+ throttle.clear(throttleID);
+
+ if(!immediateSelect && currentPolygon && dragOptions.selectionDefs) {
+ // save last polygons
+ currentPolygon.subtract = subtract;
+ dragOptions.selectionDefs.push(currentPolygon);
+
+ // we have to keep reference to arrays container
+ dragOptions.mergedPolygons.length = 0;
+ [].push.apply(dragOptions.mergedPolygons, mergedPolygons);
+ }
+
+ if(immediateSelect || isDrawMode) {
+ clearSelectionsCache(dragOptions, immediateSelect);
+ }
+
+ if(dragOptions.doneFnCompleted) {
+ dragOptions.doneFnCompleted(selection);
+ }
+
+ if(isSelectMode) {
+ emitSelected(gd, eventData);
+ }
+ }).catch(Lib.error);
+ };
+}
+
+function selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutlines) {
+ var hoverData = gd._hoverdata;
+ var fullLayout = gd._fullLayout;
+ var clickmode = fullLayout.clickmode;
+ var sendEvents = clickmode.indexOf('event') > -1;
+ var selection = [];
+ var searchTraces, searchInfo, currentSelectionDef, selectionTesters, traceSelection;
+ var thisTracesSelection, pointOrBinSelected, subtract, eventData, i;
+
+ if(isHoverDataSet(hoverData)) {
+ coerceSelectionsCache(evt, gd, dragOptions);
+ searchTraces = determineSearchTraces(gd, xAxes, yAxes, subplot);
+ var clickedPtInfo = extractClickedPtInfo(hoverData, searchTraces);
+ var isBinnedTrace = clickedPtInfo.pointNumbers.length > 0;
+
+
+ // Note: potentially costly operation isPointOrBinSelected is
+ // called as late as possible through the use of an assignment
+ // in an if condition.
+ if(isBinnedTrace ?
+ isOnlyThisBinSelected(searchTraces, clickedPtInfo) :
+ isOnlyOnePointSelected(searchTraces) &&
+ (pointOrBinSelected = isPointOrBinSelected(clickedPtInfo))) {
+ if(polygonOutlines) polygonOutlines.remove();
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ searchInfo._module.selectPoints(searchInfo, false);
+ }
+
+ updateSelectedState(gd, searchTraces);
+
+ clearSelectionsCache(dragOptions);
+
+ if(sendEvents) {
+ emitDeselect(gd);
+ }
+ } else {
+ subtract = evt.shiftKey &&
+ (pointOrBinSelected !== undefined ?
+ pointOrBinSelected :
+ isPointOrBinSelected(clickedPtInfo));
+ currentSelectionDef = newPointSelectionDef(clickedPtInfo.pointNumber, clickedPtInfo.searchInfo, subtract);
+
+ var allSelectionDefs = dragOptions.selectionDefs.concat([currentSelectionDef]);
+ selectionTesters = multiTester(allSelectionDefs, selectionTesters);
+
+ for(i = 0; i < searchTraces.length; i++) {
+ traceSelection = searchTraces[i]._module.selectPoints(searchTraces[i], selectionTesters);
+ thisTracesSelection = fillSelectionItem(traceSelection, searchTraces[i]);
+
+ if(selection.length) {
+ for(var j = 0; j < thisTracesSelection.length; j++) {
+ selection.push(thisTracesSelection[j]);
+ }
+ } else selection = thisTracesSelection;
+ }
+
+ eventData = {points: selection};
+ updateSelectedState(gd, searchTraces, eventData);
+
+ if(currentSelectionDef && dragOptions) {
+ dragOptions.selectionDefs.push(currentSelectionDef);
+ }
+
+ if(polygonOutlines) {
+ var polygons = dragOptions.mergedPolygons;
+ var isOpenMode = openMode(dragOptions.dragmode);
+
+ // display polygons on the screen
+ displayOutlines(convertPoly(polygons, isOpenMode), polygonOutlines, dragOptions);
+ }
+
+ if(sendEvents) {
+ emitSelected(gd, eventData);
+ }
+ }
+ }
+}
+
+/**
+ * Constructs a new point selection definition object.
+ */
+function newPointSelectionDef(pointNumber, searchInfo, subtract) {
+ return {
+ pointNumber: pointNumber,
+ searchInfo: searchInfo,
+ subtract: !!subtract
+ };
+}
+
+function isPointSelectionDef(o) {
+ return 'pointNumber' in o && 'searchInfo' in o;
+}
+
+/*
+ * Constructs a new point number tester.
+ */
+function newPointNumTester(pointSelectionDef) {
+ return {
+ xmin: 0,
+ xmax: 0,
+ ymin: 0,
+ ymax: 0,
+ pts: [],
+ contains: function(pt, omitFirstEdge, pointNumber, searchInfo) {
+ var idxWantedTrace = pointSelectionDef.searchInfo.cd[0].trace._expandedIndex;
+ var idxActualTrace = searchInfo.cd[0].trace._expandedIndex;
+ return idxActualTrace === idxWantedTrace &&
+ pointNumber === pointSelectionDef.pointNumber;
+ },
+ isRect: false,
+ degenerate: false,
+ subtract: !!pointSelectionDef.subtract
+ };
+}
+
+/**
+ * Wraps multiple selection testers.
+ *
+ * @param {Array} list - An array of selection testers.
+ *
+ * @return a selection tester object with a contains function
+ * that can be called to evaluate a point against all wrapped
+ * selection testers that were passed in list.
+ */
+function multiTester(list) {
+ if(!list.length) return;
+
+ var testers = [];
+ var xmin = isPointSelectionDef(list[0]) ? 0 : list[0][0][0];
+ var xmax = xmin;
+ var ymin = isPointSelectionDef(list[0]) ? 0 : list[0][0][1];
+ var ymax = ymin;
+
+ for(var i = 0; i < list.length; i++) {
+ if(isPointSelectionDef(list[i])) {
+ testers.push(newPointNumTester(list[i]));
+ } else {
+ var tester = polygonTester(list[i]);
+ tester.subtract = !!list[i].subtract;
+ testers.push(tester);
+
+ xmin = Math.min(xmin, tester.xmin);
+ xmax = Math.max(xmax, tester.xmax);
+ ymin = Math.min(ymin, tester.ymin);
+ ymax = Math.max(ymax, tester.ymax);
+ }
+ }
+
+ /**
+ * Tests if the given point is within this tester.
+ *
+ * @param {Array} pt - [0] is the x coordinate, [1] is the y coordinate of the point.
+ * @param {*} arg - An optional parameter to pass down to wrapped testers.
+ * @param {number} pointNumber - The point number of the point within the underlying data array.
+ * @param {number} searchInfo - An object identifying the trace the point is contained in.
+ *
+ * @return {boolean} true if point is considered to be selected, false otherwise.
+ */
+ function contains(pt, arg, pointNumber, searchInfo) {
+ var contained = false;
+ for(var i = 0; i < testers.length; i++) {
+ if(testers[i].contains(pt, arg, pointNumber, searchInfo)) {
+ // if contained by subtract tester - exclude the point
+ contained = !testers[i].subtract;
+ }
+ }
+
+ return contained;
+ }
+
+ return {
+ xmin: xmin,
+ xmax: xmax,
+ ymin: ymin,
+ ymax: ymax,
+ pts: [],
+ contains: contains,
+ isRect: false,
+ degenerate: false
+ };
+}
+
+function coerceSelectionsCache(evt, gd, dragOptions) {
+ var fullLayout = gd._fullLayout;
+ var plotinfo = dragOptions.plotinfo;
+ var dragmode = dragOptions.dragmode;
+
+ var selectingOnSameSubplot = (
+ fullLayout._lastSelectedSubplot &&
+ fullLayout._lastSelectedSubplot === plotinfo.id
+ );
+
+ var hasModifierKey = (evt.shiftKey || evt.altKey) &&
+ !(drawMode(dragmode) && openMode(dragmode));
+
+ if(
+ selectingOnSameSubplot &&
+ hasModifierKey &&
+ plotinfo.selection &&
+ plotinfo.selection.selectionDefs &&
+ !dragOptions.selectionDefs
+ ) {
+ // take over selection definitions from prev mode, if any
+ dragOptions.selectionDefs = plotinfo.selection.selectionDefs;
+ dragOptions.mergedPolygons = plotinfo.selection.mergedPolygons;
+ } else if(!hasModifierKey || !plotinfo.selection) {
+ clearSelectionsCache(dragOptions);
+ }
+
+ // clear selection outline when selecting a different subplot
+ if(!selectingOnSameSubplot) {
+ clearOutline(gd);
+ fullLayout._lastSelectedSubplot = plotinfo.id;
+ }
+}
+
+function hasActiveShape(gd) {
+ return gd._fullLayout._activeShapeIndex >= 0;
+}
+
+function hasActiveSelection(gd) {
+ return gd._fullLayout._activeSelectionIndex >= 0;
+}
+
+function clearSelectionsCache(dragOptions, immediateSelect) {
+ var dragmode = dragOptions.dragmode;
+ var plotinfo = dragOptions.plotinfo;
+
+ var gd = dragOptions.gd;
+ if(hasActiveShape(gd)) {
+ gd._fullLayout._deactivateShape(gd);
+ }
+ if(hasActiveSelection(gd)) {
+ gd._fullLayout._deactivateSelection(gd);
+ }
+
+ var fullLayout = gd._fullLayout;
+ var zoomLayer = fullLayout._zoomlayer;
+
+ var isDrawMode = drawMode(dragmode);
+ var isSelectMode = selectMode(dragmode);
+
+ if(isDrawMode || isSelectMode) {
+ var outlines = zoomLayer.selectAll('.select-outline-' + plotinfo.id);
+ if(outlines && gd._fullLayout._outlining) {
+ // add shape
+ var shapes;
+ if(isDrawMode) {
+ shapes = newShapes(outlines, dragOptions);
+ }
+ if(shapes) {
+ Registry.call('_guiRelayout', gd, {
+ shapes: shapes
+ });
+ }
+
+ // add selection
+ var selections;
+ if(
+ isSelectMode &&
+ !hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
+ ) {
+ selections = newSelections(outlines, dragOptions);
+ }
+ if(selections) {
+ Registry.call('_guiRelayout', gd, {
+ selections: selections
+ }).then(function() {
+ if(immediateSelect) { activateLastSelection(gd); }
+ });
+ }
+
+ gd._fullLayout._outlining = false;
+ }
+ }
+
+ plotinfo.selection = {};
+ plotinfo.selection.selectionDefs = dragOptions.selectionDefs = [];
+ plotinfo.selection.mergedPolygons = dragOptions.mergedPolygons = [];
+}
+
+function getAxId(ax) {
+ return ax._id;
+}
+
+function determineSearchTraces(gd, xAxes, yAxes, subplot) {
+ if(!gd.calcdata) return [];
+
+ var searchTraces = [];
+ var xAxisIds = xAxes.map(getAxId);
+ var yAxisIds = yAxes.map(getAxId);
+ var cd, trace, i;
+
+ for(i = 0; i < gd.calcdata.length; i++) {
+ cd = gd.calcdata[i];
+ trace = cd[0].trace;
+
+ if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
+
+ if(
+ hasSubplot({subplot: subplot}) &&
+ (trace.subplot === subplot || trace.geo === subplot)
+ ) {
+ searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
+ } else if(trace.type === 'splom') {
+ // FIXME: make sure we don't have more than single axis for splom
+ if(trace._xaxes[xAxisIds[0]] && trace._yaxes[yAxisIds[0]]) {
+ var info = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
+ info.scene = gd._fullLayout._splomScenes[trace.uid];
+ searchTraces.push(info);
+ }
+ } else if(trace.type === 'sankey') {
+ var sankeyInfo = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
+ searchTraces.push(sankeyInfo);
+ } else {
+ if(xAxisIds.indexOf(trace.xaxis) === -1) continue;
+ if(yAxisIds.indexOf(trace.yaxis) === -1) continue;
+
+ searchTraces.push(createSearchInfo(trace._module, cd,
+ getFromId(gd, trace.xaxis), getFromId(gd, trace.yaxis)));
+ }
+ }
+
+ return searchTraces;
+}
+
+function createSearchInfo(module, calcData, xaxis, yaxis) {
+ return {
+ _module: module,
+ cd: calcData,
+ xaxis: xaxis,
+ yaxis: yaxis
+ };
+}
+
+function isHoverDataSet(hoverData) {
+ return hoverData &&
+ Array.isArray(hoverData) &&
+ hoverData[0].hoverOnBox !== true;
+}
+
+function extractClickedPtInfo(hoverData, searchTraces) {
+ var hoverDatum = hoverData[0];
+ var pointNumber = -1;
+ var pointNumbers = [];
+ var searchInfo, i;
+
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ if(hoverDatum.fullData._expandedIndex === searchInfo.cd[0].trace._expandedIndex) {
+ // Special case for box (and violin)
+ if(hoverDatum.hoverOnBox === true) {
+ break;
+ }
+
+ // Hint: in some traces like histogram, one graphical element
+ // doesn't correspond to one particular data point, but to
+ // bins of data points. Thus, hoverDatum can have a binNumber
+ // property instead of pointNumber.
+ if(hoverDatum.pointNumber !== undefined) {
+ pointNumber = hoverDatum.pointNumber;
+ } else if(hoverDatum.binNumber !== undefined) {
+ pointNumber = hoverDatum.binNumber;
+ pointNumbers = hoverDatum.pointNumbers;
+ }
+
+ break;
+ }
+ }
+
+ return {
+ pointNumber: pointNumber,
+ pointNumbers: pointNumbers,
+ searchInfo: searchInfo
+ };
+}
+
+function isPointOrBinSelected(clickedPtInfo) {
+ var trace = clickedPtInfo.searchInfo.cd[0].trace;
+ var ptNum = clickedPtInfo.pointNumber;
+ var ptNums = clickedPtInfo.pointNumbers;
+ var ptNumsSet = ptNums.length > 0;
+
+ // When pointsNumbers is set (e.g. histogram's binning),
+ // it is assumed that when the first point of
+ // a bin is selected, all others are as well
+ var ptNumToTest = ptNumsSet ? ptNums[0] : ptNum;
+
+ // TODO potential performance improvement
+ // Primarily we need this function to determine if a click adds
+ // or subtracts from a selection.
+ // In cases `trace.selectedpoints` is a huge array, indexOf
+ // might be slow. One remedy would be to introduce a hash somewhere.
+ return trace.selectedpoints ? trace.selectedpoints.indexOf(ptNumToTest) > -1 : false;
+}
+
+function isOnlyThisBinSelected(searchTraces, clickedPtInfo) {
+ var tracesWithSelectedPts = [];
+ var searchInfo, trace, isSameTrace, i;
+
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ if(searchInfo.cd[0].trace.selectedpoints && searchInfo.cd[0].trace.selectedpoints.length > 0) {
+ tracesWithSelectedPts.push(searchInfo);
+ }
+ }
+
+ if(tracesWithSelectedPts.length === 1) {
+ isSameTrace = tracesWithSelectedPts[0] === clickedPtInfo.searchInfo;
+ if(isSameTrace) {
+ trace = clickedPtInfo.searchInfo.cd[0].trace;
+ if(trace.selectedpoints.length === clickedPtInfo.pointNumbers.length) {
+ for(i = 0; i < clickedPtInfo.pointNumbers.length; i++) {
+ if(trace.selectedpoints.indexOf(clickedPtInfo.pointNumbers[i]) < 0) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+function isOnlyOnePointSelected(searchTraces) {
+ var len = 0;
+ var searchInfo, trace, i;
+
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ trace = searchInfo.cd[0].trace;
+ if(trace.selectedpoints) {
+ if(trace.selectedpoints.length > 1) return false;
+
+ len += trace.selectedpoints.length;
+ if(len > 1) return false;
+ }
+ }
+
+ return len === 1;
+}
+
+function updateSelectedState(gd, searchTraces, eventData) {
+ var i;
+
+ // before anything else, update preGUI if necessary
+ for(i = 0; i < searchTraces.length; i++) {
+ var fullInputTrace = searchTraces[i].cd[0].trace._fullInput;
+ var tracePreGUI = gd._fullLayout._tracePreGUI[fullInputTrace.uid] || {};
+ if(tracePreGUI.selectedpoints === undefined) {
+ tracePreGUI.selectedpoints = fullInputTrace._input.selectedpoints || null;
+ }
+ }
+
+ var trace;
+ if(eventData) {
+ var pts = eventData.points || [];
+ for(i = 0; i < searchTraces.length; i++) {
+ trace = searchTraces[i].cd[0].trace;
+ trace._input.selectedpoints = trace._fullInput.selectedpoints = [];
+ if(trace._fullInput !== trace) trace.selectedpoints = [];
+ }
+
+ for(var k = 0; k < pts.length; k++) {
+ var pt = pts[k];
+ var data = pt.data;
+ var fullData = pt.fullData;
+ var pointIndex = pt.pointIndex;
+ var pointIndices = pt.pointIndices;
+ if(pointIndices) {
+ [].push.apply(data.selectedpoints, pointIndices);
+ if(trace._fullInput !== trace) {
+ [].push.apply(fullData.selectedpoints, pointIndices);
+ }
+ } else {
+ data.selectedpoints.push(pointIndex);
+ if(trace._fullInput !== trace) {
+ fullData.selectedpoints.push(pointIndex);
+ }
+ }
+ }
+ } else {
+ for(i = 0; i < searchTraces.length; i++) {
+ trace = searchTraces[i].cd[0].trace;
+ delete trace.selectedpoints;
+ delete trace._input.selectedpoints;
+ if(trace._fullInput !== trace) {
+ delete trace._fullInput.selectedpoints;
+ }
+ }
+ }
+
+ updateReglSelectedState(gd, searchTraces);
+}
+
+function updateReglSelectedState(gd, searchTraces) {
+ var hasRegl = false;
+
+ for(var i = 0; i < searchTraces.length; i++) {
+ var searchInfo = searchTraces[i];
+ var cd = searchInfo.cd;
+
+ if(Registry.traceIs(cd[0].trace, 'regl')) {
+ hasRegl = true;
+ }
+
+ var _module = searchInfo._module;
+ var fn = _module.styleOnSelect || _module.style;
+ if(fn) {
+ fn(gd, cd, cd[0].node3);
+ if(cd[0].nodeRangePlot3) fn(gd, cd, cd[0].nodeRangePlot3);
+ }
+ }
+
+ if(hasRegl) {
+ clearGlCanvases(gd);
+ redrawReglTraces(gd);
+ }
+}
+
+function mergePolygons(list, poly, subtract) {
+ var fn = subtract ?
+ polybool.difference :
+ polybool.union;
+
+ var res = fn({
+ regions: list
+ }, {
+ regions: [poly]
+ });
+
+ var allPolygons = res.regions.reverse();
+
+ for(var i = 0; i < allPolygons.length; i++) {
+ var polygon = allPolygons[i];
+
+ polygon.subtract = getSubtract(polygon, allPolygons.slice(0, i));
+ }
+
+ return allPolygons;
+}
+
+function fillSelectionItem(selection, searchInfo) {
+ if(Array.isArray(selection)) {
+ var cd = searchInfo.cd;
+ var trace = searchInfo.cd[0].trace;
+
+ for(var i = 0; i < selection.length; i++) {
+ selection[i] = makeEventData(selection[i], trace, cd);
+ }
+ }
+
+ return selection;
+}
+
+function convertPoly(polygonsIn, isOpenMode) { // add M and L command to draft positions
+ var polygonsOut = [];
+ for(var i = 0; i < polygonsIn.length; i++) {
+ polygonsOut[i] = [];
+ for(var j = 0; j < polygonsIn[i].length; j++) {
+ polygonsOut[i][j] = [];
+ polygonsOut[i][j][0] = j ? 'L' : 'M';
+ for(var k = 0; k < polygonsIn[i][j].length; k++) {
+ polygonsOut[i][j].push(
+ polygonsIn[i][j][k]
+ );
+ }
+ }
+
+ if(!isOpenMode) {
+ polygonsOut[i].push([
+ 'Z',
+ polygonsOut[i][0][1], // initial x
+ polygonsOut[i][0][2] // initial y
+ ]);
+ }
+ }
+
+ return polygonsOut;
+}
+
+function _doSelect(selectionTesters, searchTraces) {
+ var allSelections = [];
+
+ var thisSelection;
+ var traceSelections = [];
+ var traceSelection;
+ for(var i = 0; i < searchTraces.length; i++) {
+ var searchInfo = searchTraces[i];
+
+ traceSelection = searchInfo._module.selectPoints(searchInfo, selectionTesters);
+ traceSelections.push(traceSelection);
+
+ thisSelection = fillSelectionItem(traceSelection, searchInfo);
+
+ allSelections = allSelections.concat(thisSelection);
+ }
+
+ return allSelections;
+}
+
+function reselect(gd, selectionTesters, searchTraces, dragOptions) {
+ var hadSearchTraces = !!searchTraces;
+ var plotinfo, xRef, yRef;
+ if(dragOptions) {
+ plotinfo = dragOptions.plotinfo;
+ xRef = dragOptions.xaxes[0]._id;
+ yRef = dragOptions.yaxes[0]._id;
+ }
+
+ var allSelections = [];
+ var allSearchTraces = [];
+
+ // select layout.selection polygons
+ var layoutPolygons = getLayoutPolygons(gd);
+
+ // add draft outline polygons to layoutPolygons
+ var fullLayout = gd._fullLayout;
+ if(plotinfo) {
+ var zoomLayer = fullLayout._zoomlayer;
+ var mode = fullLayout.dragmode;
+ var isDrawMode = drawMode(mode);
+ var isSelectMode = selectMode(mode);
+ if(isDrawMode || isSelectMode) {
+ var xaxis = getFromId(gd, xRef, 'x');
+ var yaxis = getFromId(gd, yRef, 'y');
+ if(xaxis && yaxis) {
+ var outlines = zoomLayer.selectAll('.select-outline-' + plotinfo.id);
+ if(outlines && gd._fullLayout._outlining) {
+ if(outlines.length) {
+ var e = outlines[0][0]; // pick first
+ var d = e.getAttribute('d');
+ var outlinePolys = readPaths(d, gd, plotinfo);
+
+ var draftPolygons = [];
+ for(var u = 0; u < outlinePolys.length; u++) {
+ var p = outlinePolys[u];
+ var polygon = [];
+ for(var t = 0; t < p.length; t++) {
+ polygon.push([
+ convert(xaxis, p[t][1]),
+ convert(yaxis, p[t][2])
+ ]);
+ }
+
+ polygon.xref = xRef;
+ polygon.yref = yRef;
+ polygon.subtract = getSubtract(polygon, draftPolygons);
+
+ draftPolygons.push(polygon);
+ }
+
+ layoutPolygons = layoutPolygons.concat(draftPolygons);
+ }
+ }
+ }
+ }
+ }
+
+ var subplots = (xRef && yRef) ? [xRef + yRef] :
+ fullLayout._subplots.cartesian;
+
+ epmtySplomSelectionBatch(gd);
+
+ var seenSplom = {};
+
+ for(var i = 0; i < subplots.length; i++) {
+ var subplot = subplots[i];
+ var yAt = subplot.indexOf('y');
+ var _xRef = subplot.slice(0, yAt);
+ var _yRef = subplot.slice(yAt);
+
+ var _selectionTesters = (xRef && yRef) ? selectionTesters : undefined;
+ _selectionTesters = addTester(layoutPolygons, _xRef, _yRef, _selectionTesters);
+
+ if(_selectionTesters) {
+ var _searchTraces = searchTraces;
+ if(!hadSearchTraces) {
+ var _xaxis = getFromId(gd, _xRef, 'x');
+ var _yaxis = getFromId(gd, _yRef, 'y');
+
+ _searchTraces = determineSearchTraces(
+ gd,
+ [_xaxis],
+ [_yaxis],
+ subplot
+ );
+
+ for(var w = 0; w < _searchTraces.length; w++) {
+ var s = _searchTraces[w];
+ var cd0 = s.cd[0];
+ var trace = cd0.trace;
+
+ if(s._module.name === 'scattergl' && !cd0.t.xpx) {
+ var x = trace.x;
+ var y = trace.y;
+ var len = trace._length;
+ // generate stash for scattergl
+ cd0.t.xpx = [];
+ cd0.t.ypx = [];
+ for(var j = 0; j < len; j++) {
+ cd0.t.xpx[j] = _xaxis.c2p(x[j]);
+ cd0.t.ypx[j] = _yaxis.c2p(y[j]);
+ }
+ }
+
+ if(s._module.name === 'splom') {
+ if(!seenSplom[trace.uid]) {
+ seenSplom[trace.uid] = true;
+ }
+ }
+ }
+ }
+ var selection = _doSelect(_selectionTesters, _searchTraces);
+
+ allSelections = allSelections.concat(selection);
+ allSearchTraces = allSearchTraces.concat(_searchTraces);
+ }
+ }
+
+ var eventData = {points: allSelections};
+ updateSelectedState(gd, allSearchTraces, eventData);
+
+ var clickmode = fullLayout.clickmode;
+ var sendEvents = clickmode.indexOf('event') > -1;
+
+ if(
+ !plotinfo && // get called from plot_api & plots
+ fullLayout._reselect
+ ) {
+ if(sendEvents) {
+ var activePolygons = getLayoutPolygons(gd, true);
+
+ var xref = activePolygons[0].xref;
+ var yref = activePolygons[0].yref;
+ if(xref && yref) {
+ var poly = castMultiPolygon(activePolygons);
+
+ var fillRangeItems = makeFillRangeItems([
+ getFromId(gd, xref, 'x'),
+ getFromId(gd, yref, 'y')
+ ]);
+
+ fillRangeItems(eventData, poly);
+ }
+
+ emitSelected(gd, eventData);
+ }
+
+ fullLayout._reselect = false;
+ }
+
+ if(
+ !plotinfo && // get called from plot_api & plots
+ fullLayout._deselect
+ ) {
+ var deselect = fullLayout._deselect;
+ xRef = deselect.xref;
+ yRef = deselect.yref;
+
+ if(!subplotSelected(xRef, yRef, allSearchTraces)) {
+ deselectSubplot(gd, xRef, yRef, searchTraces);
+ }
+
+ if(sendEvents) {
+ if(eventData.points.length) {
+ emitSelected(gd, eventData);
+ } else {
+ gd.emit('plotly_deselect', null);
+ }
+ }
+
+ fullLayout._deselect = false;
+ }
+
+ return {
+ eventData: eventData,
+ selectionTesters: selectionTesters
+ };
+}
+
+function epmtySplomSelectionBatch(gd) {
+ var cd = gd.calcdata;
+ if(!cd) return;
+
+ for(var i = 0; i < cd.length; i++) {
+ var cd0 = cd[i][0];
+ var trace = cd0.trace;
+ var splomScenes = gd._fullLayout._splomScenes;
+ if(splomScenes) {
+ var scene = splomScenes[trace.uid];
+ if(scene) {
+ scene.selectBatch = [];
+ }
+ }
+ }
+}
+
+function subplotSelected(xRef, yRef, searchTraces) {
+ for(var i = 0; i < searchTraces.length; i++) {
+ var s = searchTraces[i];
+ if(
+ (s.xaxis && s.xaxis._id === xRef) &&
+ (s.yaxis && s.yaxis._id === yRef)
+ ) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function deselectSubplot(gd, xRef, yRef, searchTraces) {
+ searchTraces = determineSearchTraces(
+ gd,
+ [getFromId(gd, xRef, 'x')],
+ [getFromId(gd, yRef, 'y')],
+ xRef + yRef
+ );
+
+ for(var k = 0; k < searchTraces.length; k++) {
+ var searchInfo = searchTraces[k];
+ searchInfo._module.selectPoints(searchInfo, false);
+ }
+
+ updateSelectedState(gd, searchTraces);
+}
+
+function addTester(layoutPolygons, xRef, yRef, selectionTesters) {
+ var mergedPolygons;
+
+ for(var i = 0; i < layoutPolygons.length; i++) {
+ var currentPolygon = layoutPolygons[i];
+ if(xRef !== currentPolygon.xref || yRef !== currentPolygon.yref) continue;
+
+ if(mergedPolygons) {
+ var subtract = !!currentPolygon.subtract;
+ mergedPolygons = mergePolygons(mergedPolygons, currentPolygon, subtract);
+ selectionTesters = multiTester(mergedPolygons);
+ } else {
+ mergedPolygons = [currentPolygon];
+ selectionTesters = polygonTester(currentPolygon);
+ }
+ }
+
+ return selectionTesters;
+}
+
+function getLayoutPolygons(gd, onlyActiveOnes) {
+ var allPolygons = [];
+
+ var fullLayout = gd._fullLayout;
+ var allSelections = fullLayout.selections;
+ var len = allSelections.length;
+
+ for(var i = 0; i < len; i++) {
+ if(onlyActiveOnes && i !== fullLayout._activeSelectionIndex) continue;
+
+ var selection = allSelections[i];
+ if(!selection) continue;
+
+ var xref = selection.xref;
+ var yref = selection.yref;
+
+ var xaxis = getFromId(gd, xref, 'x');
+ var yaxis = getFromId(gd, yref, 'y');
+
+ var xmin, xmax, ymin, ymax;
+
+ var polygon;
+ if(selection.type === 'rect') {
+ polygon = [];
+
+ var x0 = convert(xaxis, selection.x0);
+ var x1 = convert(xaxis, selection.x1);
+ var y0 = convert(yaxis, selection.y0);
+ var y1 = convert(yaxis, selection.y1);
+ polygon = [[x0, y0], [x0, y1], [x1, y1], [x1, y0]];
+
+ xmin = Math.min(x0, x1);
+ xmax = Math.max(x0, x1);
+ ymin = Math.min(y0, y1);
+ ymax = Math.max(y0, y1);
+
+ polygon.xmin = xmin;
+ polygon.xmax = xmax;
+ polygon.ymin = ymin;
+ polygon.ymax = ymax;
+
+ polygon.xref = xref;
+ polygon.yref = yref;
+
+ polygon.subtract = false;
+ polygon.isRect = true;
+
+ allPolygons.push(polygon);
+ } else if(selection.type === 'path') {
+ var segments = selection.path.split('Z');
+
+ var multiPolygons = [];
+ for(var j = 0; j < segments.length; j++) {
+ var path = segments[j];
+ if(!path) continue;
+ path += 'Z';
+
+ var allX = shapeHelpers.extractPathCoords(path, shapeConstants.paramIsX, 'raw');
+ var allY = shapeHelpers.extractPathCoords(path, shapeConstants.paramIsY, 'raw');
+
+ xmin = Infinity;
+ xmax = -Infinity;
+ ymin = Infinity;
+ ymax = -Infinity;
+
+ polygon = [];
+
+ for(var k = 0; k < allX.length; k++) {
+ var x = convert(xaxis, allX[k]);
+ var y = convert(yaxis, allY[k]);
+
+ polygon.push([x, y]);
+
+ xmin = Math.min(x, xmin);
+ xmax = Math.max(x, xmax);
+ ymin = Math.min(y, ymin);
+ ymax = Math.max(y, ymax);
+ }
+
+ polygon.xmin = xmin;
+ polygon.xmax = xmax;
+ polygon.ymin = ymin;
+ polygon.ymax = ymax;
+
+ polygon.xref = xref;
+ polygon.yref = yref;
+ polygon.subtract = getSubtract(polygon, multiPolygons);
+
+ multiPolygons.push(polygon);
+ allPolygons.push(polygon);
+ }
+ }
+ }
+
+ return allPolygons;
+}
+
+function getSubtract(polygon, previousPolygons) {
+ var subtract = false;
+ for(var i = 0; i < previousPolygons.length; i++) {
+ var previousPolygon = previousPolygons[i];
+
+ // find out if a point of polygon is inside previous polygons
+ for(var k = 0; k < polygon.length; k++) {
+ if(pointInPolygon(polygon[k], previousPolygon)) {
+ subtract = !subtract;
+ break;
+ }
+ }
+ }
+ return subtract;
+}
+
+function convert(ax, d) {
+ if(ax.type === 'date') d = d.replace('_', ' ');
+ return ax.type === 'log' ? ax.c2p(d) : ax.r2p(d, null, ax.calendar);
+}
+
+function castMultiPolygon(allPolygons) {
+ var len = allPolygons.length;
+
+ // descibe multi polygons in one polygon
+ var p = [];
+ for(var i = 0; i < len; i++) {
+ var polygon = allPolygons[i];
+ p = p.concat(polygon);
+
+ // add starting vertex to close
+ // which indicates next polygon
+ p = p.concat([polygon[0]]);
+ }
+
+ return computeRectAndRanges(p);
+}
+
+function computeRectAndRanges(poly) {
+ poly.isRect = poly.length === 5 &&
+ poly[0][0] === poly[4][0] &&
+ poly[0][1] === poly[4][1] &&
+ (
+ poly[0][0] === poly[1][0] &&
+ poly[2][0] === poly[3][0] &&
+ poly[0][1] === poly[3][1] &&
+ poly[1][1] === poly[2][1]
+ ) ||
+ (
+ poly[0][1] === poly[1][1] &&
+ poly[2][1] === poly[3][1] &&
+ poly[0][0] === poly[3][0] &&
+ poly[1][0] === poly[2][0]
+ );
+
+ if(poly.isRect) {
+ poly.xmin = Math.min(poly[0][0], poly[2][0]);
+ poly.xmax = Math.max(poly[0][0], poly[2][0]);
+ poly.ymin = Math.min(poly[0][1], poly[2][1]);
+ poly.ymax = Math.max(poly[0][1], poly[2][1]);
+ }
+
+ return poly;
+}
+
+function makeFillRangeItems(allAxes) {
+ return function(eventData, poly) {
+ var range;
+ var lassoPoints;
+
+ for(var i = 0; i < allAxes.length; i++) {
+ var ax = allAxes[i];
+ var id = ax._id;
+ var axLetter = id.charAt(0);
+
+ if(poly.isRect) {
+ if(!range) range = {};
+ var min = poly[axLetter + 'min'];
+ var max = poly[axLetter + 'max'];
+
+ if(min !== undefined && max !== undefined) {
+ range[id] = [
+ p2r(ax, min),
+ p2r(ax, max)
+ ].sort(ascending);
+ }
+ } else {
+ if(!lassoPoints) lassoPoints = {};
+ lassoPoints[id] = poly.map(axValue(ax));
+ }
+ }
+
+ if(range) {
+ eventData.range = range;
+ }
+
+ if(lassoPoints) {
+ eventData.lassoPoints = lassoPoints;
+ }
+ };
+}
+
+function getFillRangeItems(dragOptions) {
+ var plotinfo = dragOptions.plotinfo;
+
+ return (
+ plotinfo.fillRangeItems || // allow subplots (i.e. geo, mapbox, sankey) to override fillRangeItems routine
+ makeFillRangeItems(dragOptions.xaxes.concat(dragOptions.yaxes))
+ );
+}
+
+function emitSelecting(gd, eventData) {
+ gd.emit('plotly_selecting', eventData);
+}
+
+function emitSelected(gd, eventData) {
+ if(eventData) {
+ eventData.selections = (gd.layout || {}).selections || [];
+ }
+
+ gd.emit('plotly_selected', eventData);
+}
+
+function emitDeselect(gd) {
+ gd.emit('plotly_deselect', null);
+}
+
+module.exports = {
+ reselect: reselect,
+ prepSelect: prepSelect,
+ clearOutline: clearOutline,
+ clearSelectionsCache: clearSelectionsCache,
+ selectOnClick: selectOnClick
+};
+
+},{"../../lib":299,"../../lib/clear_gl_canvases":287,"../../lib/polygon":311,"../../lib/throttle":323,"../../plot_api/subroutines":336,"../../plots/cartesian/axis_ids":350,"../../registry":387,"../color":158,"../dragelement/helpers":176,"../drawing":180,"../fx":198,"../fx/helpers":194,"../shapes/constants":250,"../shapes/display_outlines":252,"../shapes/draw_newshape/helpers":257,"../shapes/draw_newshape/newshapes":258,"../shapes/handle_outline":259,"../shapes/helpers":260,"./constants":239,"./draw":241,"./draw_newselection/newselections":244,"./helpers":245,"point-in-polygon/nested":75,"polybooljs":76}],248:[function(_dereq_,module,exports){
'use strict';
var annAttrs = _dereq_('../annotations/attributes');
@@ -45165,7 +47370,7 @@ module.exports = templatedArray('shape', {
editType: 'arraydraw'
});
-},{"../../constants/axis_placeable_objects":263,"../../lib/extend":281,"../../plot_api/plot_template":323,"../../traces/scatter/attributes":500,"../annotations/attributes":140,"../drawing/attributes":178}],238:[function(_dereq_,module,exports){
+},{"../../constants/axis_placeable_objects":275,"../../lib/extend":293,"../../plot_api/plot_template":335,"../../traces/scatter/attributes":509,"../annotations/attributes":141,"../drawing/attributes":179}],249:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -45277,7 +47482,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) {
if(max >= min) return [min, max];
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"./constants":239,"./helpers":248}],239:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":250,"./helpers":260}],250:[function(_dereq_,module,exports){
'use strict';
@@ -45332,7 +47537,7 @@ module.exports = {
}
};
-},{}],240:[function(_dereq_,module,exports){
+},{}],251:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -45361,7 +47566,8 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
var path = coerce('path');
var dfltType = path ? 'path' : 'rect';
var shapeType = coerce('type', dfltType);
- if(shapeOut.type !== 'path') delete shapeOut.path;
+ var noPath = shapeType !== 'path';
+ if(noPath) delete shapeOut.path;
coerce('editable');
coerce('layer');
@@ -45403,7 +47609,7 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
}
// Coerce x0, x1, y0, y1
- if(shapeType !== 'path') {
+ if(noPath) {
var dflt0 = 0.25;
var dflt1 = 0.75;
@@ -45447,14 +47653,415 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
}
}
- if(shapeType === 'path') {
- coerce('path');
- } else {
+ if(noPath) {
Lib.noneOrAll(shapeIn, shapeOut, ['x0', 'x1', 'y0', 'y1']);
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"./attributes":237,"./helpers":248}],241:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":248,"./helpers":260}],252:[function(_dereq_,module,exports){
+'use strict';
+
+var Lib = _dereq_('../../lib');
+var strTranslate = Lib.strTranslate;
+
+var dragElement = _dereq_('../dragelement');
+var dragHelpers = _dereq_('../dragelement/helpers');
+var drawMode = dragHelpers.drawMode;
+var selectMode = dragHelpers.selectMode;
+
+var Registry = _dereq_('../../registry');
+var Color = _dereq_('../color');
+
+var constants = _dereq_('./draw_newshape/constants');
+var i000 = constants.i000;
+var i090 = constants.i090;
+var i180 = constants.i180;
+var i270 = constants.i270;
+
+var handleOutline = _dereq_('./handle_outline');
+var clearOutlineControllers = handleOutline.clearOutlineControllers;
+
+var helpers = _dereq_('./draw_newshape/helpers');
+var pointsOnRectangle = helpers.pointsOnRectangle;
+var pointsOnEllipse = helpers.pointsOnEllipse;
+var writePaths = helpers.writePaths;
+var newShapes = _dereq_('./draw_newshape/newshapes');
+var newSelections = _dereq_('../selections/draw_newselection/newselections');
+
+module.exports = function displayOutlines(polygons, outlines, dragOptions, nCalls) {
+ if(!nCalls) nCalls = 0;
+
+ var gd = dragOptions.gd;
+
+ function redraw() {
+ // recursive call
+ displayOutlines(polygons, outlines, dragOptions, nCalls++);
+
+ if(pointsOnEllipse(polygons[0])) {
+ update({redrawing: true});
+ }
+ }
+
+ function update(opts) {
+ var updateObject = {};
+
+ if(dragOptions.isActiveShape !== undefined) {
+ dragOptions.isActiveShape = false; // i.e. to disable shape controllers
+ updateObject = newShapes(outlines, dragOptions);
+ }
+
+ if(dragOptions.isActiveSelection !== undefined) {
+ dragOptions.isActiveSelection = false; // i.e. to disable selection controllers
+ updateObject = newSelections(outlines, dragOptions);
+
+ gd._fullLayout._reselect = true;
+ }
+
+ if(Object.keys(updateObject).length) {
+ Registry.call((opts || {}).redrawing ? 'relayout' : '_guiRelayout', gd, updateObject);
+ }
+ }
+
+ var fullLayout = gd._fullLayout;
+ var zoomLayer = fullLayout._zoomlayer;
+
+ var dragmode = dragOptions.dragmode;
+ var isDrawMode = drawMode(dragmode);
+ var isSelectMode = selectMode(dragmode);
+
+ if(isDrawMode || isSelectMode) {
+ gd._fullLayout._outlining = true;
+ }
+
+ clearOutlineControllers(gd);
+
+ // make outline
+ outlines.attr('d', writePaths(polygons));
+
+ // add controllers
+ var vertexDragOptions;
+ var groupDragOptions;
+ var indexI; // cell index
+ var indexJ; // vertex or cell-controller index
+ var copyPolygons;
+
+ if(!nCalls && (
+ dragOptions.isActiveShape ||
+ dragOptions.isActiveSelection
+ )) {
+ copyPolygons = recordPositions([], polygons);
+
+ var g = zoomLayer.append('g').attr('class', 'outline-controllers');
+ addVertexControllers(g);
+ addGroupControllers();
+ }
+
+ function startDragVertex(evt) {
+ indexI = +evt.srcElement.getAttribute('data-i');
+ indexJ = +evt.srcElement.getAttribute('data-j');
+
+ vertexDragOptions[indexI][indexJ].moveFn = moveVertexController;
+ }
+
+ function moveVertexController(dx, dy) {
+ if(!polygons.length) return;
+
+ var x0 = copyPolygons[indexI][indexJ][1];
+ var y0 = copyPolygons[indexI][indexJ][2];
+
+ var cell = polygons[indexI];
+ var len = cell.length;
+ if(pointsOnRectangle(cell)) {
+ var _dx = dx;
+ var _dy = dy;
+ if(dragOptions.isActiveSelection) {
+ // handle an edge contoller for rect selections
+ var nextPoint = getNextPoint(cell, indexJ);
+ if(nextPoint[1] === cell[indexJ][1]) { // a vertical edge
+ _dy = 0;
+ } else { // a horizontal edge
+ _dx = 0;
+ }
+ }
+
+ for(var q = 0; q < len; q++) {
+ if(q === indexJ) continue;
+
+ // move other corners of rectangle
+ var pos = cell[q];
+
+ if(pos[1] === cell[indexJ][1]) {
+ pos[1] = x0 + _dx;
+ }
+
+ if(pos[2] === cell[indexJ][2]) {
+ pos[2] = y0 + _dy;
+ }
+ }
+ // move the corner
+ cell[indexJ][1] = x0 + _dx;
+ cell[indexJ][2] = y0 + _dy;
+
+ if(!pointsOnRectangle(cell)) {
+ // reject result to rectangles with ensure areas
+ for(var j = 0; j < len; j++) {
+ for(var k = 0; k < cell[j].length; k++) {
+ cell[j][k] = copyPolygons[indexI][j][k];
+ }
+ }
+ }
+ } else { // other polylines
+ cell[indexJ][1] = x0 + dx;
+ cell[indexJ][2] = y0 + dy;
+ }
+
+ redraw();
+ }
+
+ function endDragVertexController() {
+ update();
+ }
+
+ function removeVertex() {
+ if(!polygons.length) return;
+ if(!polygons[indexI]) return;
+ if(!polygons[indexI].length) return;
+
+ var newPolygon = [];
+ for(var j = 0; j < polygons[indexI].length; j++) {
+ if(j !== indexJ) {
+ newPolygon.push(
+ polygons[indexI][j]
+ );
+ }
+ }
+
+ if(newPolygon.length > 1 && !(
+ newPolygon.length === 2 && newPolygon[1][0] === 'Z')
+ ) {
+ if(indexJ === 0) {
+ newPolygon[0][0] = 'M';
+ }
+
+ polygons[indexI] = newPolygon;
+
+ redraw();
+ update();
+ }
+ }
+
+ function clickVertexController(numClicks, evt) {
+ if(numClicks === 2) {
+ indexI = +evt.srcElement.getAttribute('data-i');
+ indexJ = +evt.srcElement.getAttribute('data-j');
+
+ var cell = polygons[indexI];
+ if(
+ !pointsOnRectangle(cell) &&
+ !pointsOnEllipse(cell)
+ ) {
+ removeVertex();
+ }
+ }
+ }
+
+ function addVertexControllers(g) {
+ vertexDragOptions = [];
+
+ for(var i = 0; i < polygons.length; i++) {
+ var cell = polygons[i];
+
+ var onRect = pointsOnRectangle(cell);
+ var onEllipse = !onRect && pointsOnEllipse(cell);
+
+ vertexDragOptions[i] = [];
+ var len = cell.length;
+ for(var j = 0; j < len; j++) {
+ if(cell[j][0] === 'Z') continue;
+
+ if(onEllipse &&
+ j !== i000 &&
+ j !== i090 &&
+ j !== i180 &&
+ j !== i270
+ ) {
+ continue;
+ }
+
+ var rectSelection = onRect && dragOptions.isActiveSelection;
+ var nextPoint;
+ if(rectSelection) nextPoint = getNextPoint(cell, j);
+
+ var x = cell[j][1];
+ var y = cell[j][2];
+
+ var vertex = g.append(rectSelection ? 'rect' : 'circle')
+ .attr('data-i', i)
+ .attr('data-j', j)
+ .style({
+ fill: Color.background,
+ stroke: Color.defaultLine,
+ 'stroke-width': 1,
+ 'shape-rendering': 'crispEdges',
+ });
+
+ if(rectSelection) {
+ // convert a vertex controller to an edge controller for rect selections
+ var dx = nextPoint[1] - x;
+ var dy = nextPoint[2] - y;
+
+ var width = dy ? 5 : Math.max(Math.min(25, Math.abs(dx) - 5), 5);
+ var height = dx ? 5 : Math.max(Math.min(25, Math.abs(dy) - 5), 5);
+
+ vertex.classed(dy ? 'cursor-ew-resize' : 'cursor-ns-resize', true)
+ .attr('width', width)
+ .attr('height', height)
+ .attr('x', x - width / 2)
+ .attr('y', y - height / 2)
+ .attr('transform', strTranslate(dx / 2, dy / 2));
+ } else {
+ vertex.classed('cursor-grab', true)
+ .attr('r', 5)
+ .attr('cx', x)
+ .attr('cy', y);
+ }
+
+ vertexDragOptions[i][j] = {
+ element: vertex.node(),
+ gd: gd,
+ prepFn: startDragVertex,
+ doneFn: endDragVertexController,
+ clickFn: clickVertexController
+ };
+
+ dragElement.init(vertexDragOptions[i][j]);
+ }
+ }
+ }
+
+ function moveGroup(dx, dy) {
+ if(!polygons.length) return;
+
+ for(var i = 0; i < polygons.length; i++) {
+ for(var j = 0; j < polygons[i].length; j++) {
+ for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
+ polygons[i][j][k + 1] = copyPolygons[i][j][k + 1] + dx;
+ polygons[i][j][k + 2] = copyPolygons[i][j][k + 2] + dy;
+ }
+ }
+ }
+ }
+
+ function moveGroupController(dx, dy) {
+ moveGroup(dx, dy);
+
+ redraw();
+ }
+
+ function startDragGroupController(evt) {
+ indexI = +evt.srcElement.getAttribute('data-i');
+ if(!indexI) indexI = 0; // ensure non-existing move button get zero index
+
+ groupDragOptions[indexI].moveFn = moveGroupController;
+ }
+
+ function endDragGroupController() {
+ update();
+ }
+
+ function clickGroupController(numClicks) {
+ if(numClicks === 2) {
+ eraseActiveSelection(gd);
+ }
+ }
+
+ function addGroupControllers() {
+ groupDragOptions = [];
+
+ if(!polygons.length) return;
+
+ var i = 0;
+ groupDragOptions[i] = {
+ element: outlines[0][0],
+ gd: gd,
+ prepFn: startDragGroupController,
+ doneFn: endDragGroupController,
+ clickFn: clickGroupController
+ };
+
+ dragElement.init(groupDragOptions[i]);
+ }
+};
+
+function recordPositions(polygonsOut, polygonsIn) {
+ for(var i = 0; i < polygonsIn.length; i++) {
+ var cell = polygonsIn[i];
+ polygonsOut[i] = [];
+ for(var j = 0; j < cell.length; j++) {
+ polygonsOut[i][j] = [];
+ for(var k = 0; k < cell[j].length; k++) {
+ polygonsOut[i][j][k] = cell[j][k];
+ }
+ }
+ }
+ return polygonsOut;
+}
+
+function getNextPoint(cell, j) {
+ var x = cell[j][1];
+ var y = cell[j][2];
+ var len = cell.length;
+ var nextJ, nextX, nextY;
+ nextJ = (j + 1) % len;
+ nextX = cell[nextJ][1];
+ nextY = cell[nextJ][2];
+
+ // avoid potential double points (closing points)
+ if(nextX === x && nextY === y) {
+ nextJ = (j + 2) % len;
+ nextX = cell[nextJ][1];
+ nextY = cell[nextJ][2];
+ }
+
+ return [nextJ, nextX, nextY];
+}
+
+function eraseActiveSelection(gd) {
+ // Do not allow removal of selections on other dragmodes.
+ // This ensures the user could still double click to
+ // deselect all trace.selectedpoints,
+ // if that's what they wanted.
+ // Also double click to zoom back won't result in
+ // any surprising selection removal.
+ if(!selectMode(gd._fullLayout.dragmode)) return;
+
+ clearOutlineControllers(gd);
+
+ var id = gd._fullLayout._activeSelectionIndex;
+ var selections = (gd.layout || {}).selections || [];
+ if(id < selections.length) {
+ var list = [];
+ for(var q = 0; q < selections.length; q++) {
+ if(q !== id) {
+ list.push(selections[q]);
+ }
+ }
+
+ delete gd._fullLayout._activeSelectionIndex;
+
+ var erasedSelection = gd._fullLayout.selections[id];
+ gd._fullLayout._deselect = {
+ xref: erasedSelection.xref,
+ yref: erasedSelection.yref
+ };
+
+ Registry.call('_guiRelayout', gd, {
+ selections: list
+ });
+ }
+}
+
+},{"../../lib":299,"../../registry":387,"../color":158,"../dragelement":177,"../dragelement/helpers":176,"../selections/draw_newselection/newselections":244,"./draw_newshape/constants":255,"./draw_newshape/helpers":257,"./draw_newshape/newshapes":258,"./handle_outline":259}],253:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -45462,9 +48069,9 @@ var Lib = _dereq_('../../lib');
var Axes = _dereq_('../../plots/cartesian/axes');
var readPaths = _dereq_('./draw_newshape/helpers').readPaths;
-var displayOutlines = _dereq_('./draw_newshape/display_outlines');
+var displayOutlines = _dereq_('./display_outlines');
-var clearOutlineControllers = _dereq_('../../plots/cartesian/handle_outline').clearOutlineControllers;
+var clearOutlineControllers = _dereq_('./handle_outline').clearOutlineControllers;
var Color = _dereq_('../color');
var Drawing = _dereq_('../drawing');
@@ -45475,6 +48082,7 @@ var setCursor = _dereq_('../../lib/setcursor');
var constants = _dereq_('./constants');
var helpers = _dereq_('./helpers');
+var getPathString = helpers.getPathString;
// Shapes are stored in gd.layout.shapes, an array of objects
@@ -45515,7 +48123,7 @@ function draw(gd) {
}
function shouldSkipEdits(gd) {
- return !!gd._fullLayout._drawing;
+ return !!gd._fullLayout._outlining;
}
function couldHaveActiveShape(gd) {
@@ -45530,7 +48138,7 @@ function drawOne(gd, index) {
.selectAll('.shapelayer [data-index="' + index + '"]')
.remove();
- var o = helpers.makeOptionsAndPlotinfo(gd, index);
+ var o = helpers.makeShapesOptionsAndPlotinfo(gd, index);
var options = o.options;
var plotinfo = o.plotinfo;
@@ -46035,115 +48643,6 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer, editHe
}
}
-function getPathString(gd, options) {
- var type = options.type;
- var xRefType = Axes.getRefType(options.xref);
- var yRefType = Axes.getRefType(options.yref);
- var xa = Axes.getFromId(gd, options.xref);
- var ya = Axes.getFromId(gd, options.yref);
- var gs = gd._fullLayout._size;
- var x2r, x2p, y2r, y2p;
- var x0, x1, y0, y1;
-
- if(xa) {
- if(xRefType === 'domain') {
- x2p = function(v) { return xa._offset + xa._length * v; };
- } else {
- x2r = helpers.shapePositionToRange(xa);
- x2p = function(v) { return xa._offset + xa.r2p(x2r(v, true)); };
- }
- } else {
- x2p = function(v) { return gs.l + gs.w * v; };
- }
-
- if(ya) {
- if(yRefType === 'domain') {
- y2p = function(v) { return ya._offset + ya._length * (1 - v); };
- } else {
- y2r = helpers.shapePositionToRange(ya);
- y2p = function(v) { return ya._offset + ya.r2p(y2r(v, true)); };
- }
- } else {
- y2p = function(v) { return gs.t + gs.h * (1 - v); };
- }
-
- if(type === 'path') {
- if(xa && xa.type === 'date') x2p = helpers.decodeDate(x2p);
- if(ya && ya.type === 'date') y2p = helpers.decodeDate(y2p);
- return convertPath(options, x2p, y2p);
- }
-
- if(options.xsizemode === 'pixel') {
- var xAnchorPos = x2p(options.xanchor);
- x0 = xAnchorPos + options.x0;
- x1 = xAnchorPos + options.x1;
- } else {
- x0 = x2p(options.x0);
- x1 = x2p(options.x1);
- }
-
- if(options.ysizemode === 'pixel') {
- var yAnchorPos = y2p(options.yanchor);
- y0 = yAnchorPos - options.y0;
- y1 = yAnchorPos - options.y1;
- } else {
- y0 = y2p(options.y0);
- y1 = y2p(options.y1);
- }
-
- if(type === 'line') return 'M' + x0 + ',' + y0 + 'L' + x1 + ',' + y1;
- if(type === 'rect') return 'M' + x0 + ',' + y0 + 'H' + x1 + 'V' + y1 + 'H' + x0 + 'Z';
-
- // circle
- var cx = (x0 + x1) / 2;
- var cy = (y0 + y1) / 2;
- var rx = Math.abs(cx - x0);
- var ry = Math.abs(cy - y0);
- var rArc = 'A' + rx + ',' + ry;
- var rightPt = (cx + rx) + ',' + cy;
- var topPt = cx + ',' + (cy - ry);
- return 'M' + rightPt + rArc + ' 0 1,1 ' + topPt +
- rArc + ' 0 0,1 ' + rightPt + 'Z';
-}
-
-
-function convertPath(options, x2p, y2p) {
- var pathIn = options.path;
- var xSizemode = options.xsizemode;
- var ySizemode = options.ysizemode;
- var xAnchor = options.xanchor;
- var yAnchor = options.yanchor;
-
- return pathIn.replace(constants.segmentRE, function(segment) {
- var paramNumber = 0;
- var segmentType = segment.charAt(0);
- var xParams = constants.paramIsX[segmentType];
- var yParams = constants.paramIsY[segmentType];
- var nParams = constants.numParams[segmentType];
-
- var paramString = segment.substr(1).replace(constants.paramRE, function(param) {
- if(xParams[paramNumber]) {
- if(xSizemode === 'pixel') param = x2p(xAnchor) + Number(param);
- else param = x2p(param);
- } else if(yParams[paramNumber]) {
- if(ySizemode === 'pixel') param = y2p(yAnchor) - Number(param);
- else param = y2p(param);
- }
- paramNumber++;
-
- if(paramNumber > nParams) param = 'X';
- return param;
- });
-
- if(paramNumber > nParams) {
- paramString = paramString.replace(/[\s,]*X.*/, '');
- Lib.log('Ignoring extra params in segment ' + segment);
- }
-
- return segmentType + paramString;
- });
-}
-
function movePath(pathIn, moveX, moveY) {
return pathIn.replace(constants.segmentRE, function(segment) {
var paramNumber = 0;
@@ -46204,22 +48703,22 @@ function eraseActiveShape(gd) {
var id = gd._fullLayout._activeShapeIndex;
var shapes = (gd.layout || {}).shapes || [];
if(id < shapes.length) {
- var newShapes = [];
+ var list = [];
for(var q = 0; q < shapes.length; q++) {
if(q !== id) {
- newShapes.push(shapes[q]);
+ list.push(shapes[q]);
}
}
delete gd._fullLayout._activeShapeIndex;
Registry.call('_guiRelayout', gd, {
- shapes: newShapes
+ shapes: list
});
}
}
-},{"../../lib":287,"../../lib/setcursor":307,"../../plot_api/plot_template":323,"../../plots/cartesian/axes":334,"../../plots/cartesian/handle_outline":345,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"./constants":239,"./draw_newshape/display_outlines":245,"./draw_newshape/helpers":246,"./helpers":248}],242:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/setcursor":319,"../../plot_api/plot_template":335,"../../plots/cartesian/axes":346,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"./constants":250,"./display_outlines":252,"./draw_newshape/helpers":257,"./handle_outline":259,"./helpers":260}],254:[function(_dereq_,module,exports){
'use strict';
var dash = _dereq_('../../drawing/attributes').dash;
@@ -46295,7 +48794,7 @@ module.exports = {
}
};
-},{"../../../lib/extend":281,"../../drawing/attributes":178}],243:[function(_dereq_,module,exports){
+},{"../../../lib/extend":293,"../../drawing/attributes":179}],255:[function(_dereq_,module,exports){
'use strict';
var CIRCLE_SIDES = 32; // should be divisible by 4
@@ -46311,7 +48810,7 @@ module.exports = {
SQRT2: Math.sqrt(2)
};
-},{}],244:[function(_dereq_,module,exports){
+},{}],256:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../color');
@@ -46334,293 +48833,7 @@ module.exports = function supplyDrawNewShapeDefaults(layoutIn, layoutOut, coerce
coerce('activeshape.opacity');
};
-},{"../../color":157}],245:[function(_dereq_,module,exports){
-'use strict';
-
-var dragElement = _dereq_('../../dragelement');
-var dragHelpers = _dereq_('../../dragelement/helpers');
-var drawMode = dragHelpers.drawMode;
-
-var Registry = _dereq_('../../../registry');
-
-var constants = _dereq_('./constants');
-var i000 = constants.i000;
-var i090 = constants.i090;
-var i180 = constants.i180;
-var i270 = constants.i270;
-
-var handleOutline = _dereq_('../../../plots/cartesian/handle_outline');
-var clearOutlineControllers = handleOutline.clearOutlineControllers;
-
-var helpers = _dereq_('./helpers');
-var pointsShapeRectangle = helpers.pointsShapeRectangle;
-var pointsShapeEllipse = helpers.pointsShapeEllipse;
-var writePaths = helpers.writePaths;
-var newShapes = _dereq_('./newshapes');
-
-module.exports = function displayOutlines(polygons, outlines, dragOptions, nCalls) {
- if(!nCalls) nCalls = 0;
-
- var gd = dragOptions.gd;
-
- function redraw() {
- // recursive call
- displayOutlines(polygons, outlines, dragOptions, nCalls++);
-
- if(pointsShapeEllipse(polygons[0])) {
- update({redrawing: true});
- }
- }
-
- function update(opts) {
- dragOptions.isActiveShape = false; // i.e. to disable controllers
-
- var updateObject = newShapes(outlines, dragOptions);
- if(Object.keys(updateObject).length) {
- Registry.call((opts || {}).redrawing ? 'relayout' : '_guiRelayout', gd, updateObject);
- }
- }
-
-
- var isActiveShape = dragOptions.isActiveShape;
- var fullLayout = gd._fullLayout;
- var zoomLayer = fullLayout._zoomlayer;
-
- var dragmode = dragOptions.dragmode;
- var isDrawMode = drawMode(dragmode);
-
- if(isDrawMode) gd._fullLayout._drawing = true;
- else if(gd._fullLayout._activeShapeIndex >= 0) clearOutlineControllers(gd);
-
- // make outline
- outlines.attr('d', writePaths(polygons));
-
- // add controllers
- var vertexDragOptions;
- var shapeDragOptions;
- var indexI; // cell index
- var indexJ; // vertex or cell-controller index
- var copyPolygons;
-
- if(isActiveShape && !nCalls) {
- copyPolygons = recordPositions([], polygons);
-
- var g = zoomLayer.append('g').attr('class', 'outline-controllers');
- addVertexControllers(g);
- addShapeControllers();
- }
-
- function startDragVertex(evt) {
- indexI = +evt.srcElement.getAttribute('data-i');
- indexJ = +evt.srcElement.getAttribute('data-j');
-
- vertexDragOptions[indexI][indexJ].moveFn = moveVertexController;
- }
-
- function moveVertexController(dx, dy) {
- if(!polygons.length) return;
-
- var x0 = copyPolygons[indexI][indexJ][1];
- var y0 = copyPolygons[indexI][indexJ][2];
-
- var cell = polygons[indexI];
- var len = cell.length;
- if(pointsShapeRectangle(cell)) {
- for(var q = 0; q < len; q++) {
- if(q === indexJ) continue;
-
- // move other corners of rectangle
- var pos = cell[q];
-
- if(pos[1] === cell[indexJ][1]) {
- pos[1] = x0 + dx;
- }
-
- if(pos[2] === cell[indexJ][2]) {
- pos[2] = y0 + dy;
- }
- }
- // move the corner
- cell[indexJ][1] = x0 + dx;
- cell[indexJ][2] = y0 + dy;
-
- if(!pointsShapeRectangle(cell)) {
- // reject result to rectangles with ensure areas
- for(var j = 0; j < len; j++) {
- for(var k = 0; k < cell[j].length; k++) {
- cell[j][k] = copyPolygons[indexI][j][k];
- }
- }
- }
- } else { // other polylines
- cell[indexJ][1] = x0 + dx;
- cell[indexJ][2] = y0 + dy;
- }
-
- redraw();
- }
-
- function endDragVertexController() {
- update();
- }
-
- function removeVertex() {
- if(!polygons.length) return;
- if(!polygons[indexI]) return;
- if(!polygons[indexI].length) return;
-
- var newPolygon = [];
- for(var j = 0; j < polygons[indexI].length; j++) {
- if(j !== indexJ) {
- newPolygon.push(
- polygons[indexI][j]
- );
- }
- }
-
- if(newPolygon.length > 1 && !(
- newPolygon.length === 2 && newPolygon[1][0] === 'Z')
- ) {
- if(indexJ === 0) {
- newPolygon[0][0] = 'M';
- }
-
- polygons[indexI] = newPolygon;
-
- redraw();
- update();
- }
- }
-
- function clickVertexController(numClicks, evt) {
- if(numClicks === 2) {
- indexI = +evt.srcElement.getAttribute('data-i');
- indexJ = +evt.srcElement.getAttribute('data-j');
-
- var cell = polygons[indexI];
- if(
- !pointsShapeRectangle(cell) &&
- !pointsShapeEllipse(cell)
- ) {
- removeVertex();
- }
- }
- }
-
- function addVertexControllers(g) {
- vertexDragOptions = [];
-
- for(var i = 0; i < polygons.length; i++) {
- var cell = polygons[i];
-
- var onRect = pointsShapeRectangle(cell);
- var onEllipse = !onRect && pointsShapeEllipse(cell);
-
- vertexDragOptions[i] = [];
- for(var j = 0; j < cell.length; j++) {
- if(cell[j][0] === 'Z') continue;
-
- if(onEllipse &&
- j !== i000 &&
- j !== i090 &&
- j !== i180 &&
- j !== i270
- ) {
- continue;
- }
-
- var x = cell[j][1];
- var y = cell[j][2];
-
- var vertex = g.append('circle')
- .classed('cursor-grab', true)
- .attr('data-i', i)
- .attr('data-j', j)
- .attr('cx', x)
- .attr('cy', y)
- .attr('r', 4)
- .style({
- 'mix-blend-mode': 'luminosity',
- fill: 'black',
- stroke: 'white',
- 'stroke-width': 1
- });
-
- vertexDragOptions[i][j] = {
- element: vertex.node(),
- gd: gd,
- prepFn: startDragVertex,
- doneFn: endDragVertexController,
- clickFn: clickVertexController
- };
-
- dragElement.init(vertexDragOptions[i][j]);
- }
- }
- }
-
- function moveShape(dx, dy) {
- if(!polygons.length) return;
-
- for(var i = 0; i < polygons.length; i++) {
- for(var j = 0; j < polygons[i].length; j++) {
- for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
- polygons[i][j][k + 1] = copyPolygons[i][j][k + 1] + dx;
- polygons[i][j][k + 2] = copyPolygons[i][j][k + 2] + dy;
- }
- }
- }
- }
-
- function moveShapeController(dx, dy) {
- moveShape(dx, dy);
-
- redraw();
- }
-
- function startDragShapeController(evt) {
- indexI = +evt.srcElement.getAttribute('data-i');
- if(!indexI) indexI = 0; // ensure non-existing move button get zero index
-
- shapeDragOptions[indexI].moveFn = moveShapeController;
- }
-
- function endDragShapeController() {
- update();
- }
-
- function addShapeControllers() {
- shapeDragOptions = [];
-
- if(!polygons.length) return;
-
- var i = 0;
- shapeDragOptions[i] = {
- element: outlines[0][0],
- gd: gd,
- prepFn: startDragShapeController,
- doneFn: endDragShapeController
- };
-
- dragElement.init(shapeDragOptions[i]);
- }
-};
-
-function recordPositions(polygonsOut, polygonsIn) {
- for(var i = 0; i < polygonsIn.length; i++) {
- var cell = polygonsIn[i];
- polygonsOut[i] = [];
- for(var j = 0; j < cell.length; j++) {
- polygonsOut[i][j] = [];
- for(var k = 0; k < cell[j].length; k++) {
- polygonsOut[i][j][k] = cell[j][k];
- }
- }
- }
- return polygonsOut;
-}
-
-},{"../../../plots/cartesian/handle_outline":345,"../../../registry":378,"../../dragelement":176,"../../dragelement/helpers":175,"./constants":243,"./helpers":246,"./newshapes":247}],246:[function(_dereq_,module,exports){
+},{"../../color":158}],257:[function(_dereq_,module,exports){
'use strict';
var parseSvgPath = _dereq_('parse-svg-path');
@@ -46629,7 +48842,7 @@ var constants = _dereq_('./constants');
var CIRCLE_SIDES = constants.CIRCLE_SIDES;
var SQRT2 = constants.SQRT2;
-var cartesianHelpers = _dereq_('../../../plots/cartesian/helpers');
+var cartesianHelpers = _dereq_('../../selections/helpers');
var p2r = cartesianHelpers.p2r;
var r2p = cartesianHelpers.r2p;
@@ -46844,7 +49057,7 @@ function dist(a, b) {
);
}
-exports.pointsShapeRectangle = function(cell) {
+exports.pointsOnRectangle = function(cell) {
var len = cell.length;
if(len !== 5) return false;
@@ -46872,7 +49085,7 @@ exports.pointsShapeRectangle = function(cell) {
);
};
-exports.pointsShapeEllipse = function(cell) {
+exports.pointsOnEllipse = function(cell) {
var len = cell.length;
if(len !== CIRCLE_SIDES + 1) return false;
@@ -46949,7 +49162,24 @@ exports.ellipseOver = function(pos) {
};
};
-},{"../../../plots/cartesian/helpers":346,"./constants":243,"parse-svg-path":74}],247:[function(_dereq_,module,exports){
+exports.fixDatesForPaths = function(polygons, xaxis, yaxis) {
+ var xIsDate = xaxis.type === 'date';
+ var yIsDate = yaxis.type === 'date';
+ if(!xIsDate && !yIsDate) return polygons;
+
+ for(var i = 0; i < polygons.length; i++) {
+ for(var j = 0; j < polygons[i].length; j++) {
+ for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
+ if(xIsDate) polygons[i][j][k + 1] = polygons[i][j][k + 1].replace(' ', '_');
+ if(yIsDate) polygons[i][j][k + 2] = polygons[i][j][k + 2].replace(' ', '_');
+ }
+ }
+ }
+
+ return polygons;
+};
+
+},{"../../selections/helpers":245,"./constants":255,"parse-svg-path":74}],258:[function(_dereq_,module,exports){
'use strict';
var dragHelpers = _dereq_('../../dragelement/helpers');
@@ -46964,18 +49194,18 @@ var i270 = constants.i270;
var cos45 = constants.cos45;
var sin45 = constants.sin45;
-var cartesianHelpers = _dereq_('../../../plots/cartesian/helpers');
+var cartesianHelpers = _dereq_('../../selections/helpers');
var p2r = cartesianHelpers.p2r;
var r2p = cartesianHelpers.r2p;
-var handleOutline = _dereq_('../../../plots/cartesian/handle_outline');
-var clearSelect = handleOutline.clearSelect;
+var handleOutline = _dereq_('.././handle_outline');
+var clearOutline = handleOutline.clearOutline;
var helpers = _dereq_('./helpers');
var readPaths = helpers.readPaths;
var writePaths = helpers.writePaths;
var ellipseOver = helpers.ellipseOver;
-
+var fixDatesForPaths = helpers.fixDatesForPaths;
module.exports = function newShapes(outlines, dragOptions) {
if(!outlines.length) return;
@@ -46984,7 +49214,7 @@ module.exports = function newShapes(outlines, dragOptions) {
var d = e.getAttribute('d');
var gd = dragOptions.gd;
- var drwStyle = gd._fullLayout.newshape;
+ var newStyle = gd._fullLayout.newshape;
var plotinfo = dragOptions.plotinfo;
var xaxis = plotinfo.xaxis;
@@ -47032,18 +49262,18 @@ module.exports = function newShapes(outlines, dragOptions) {
xref: xPaper ? 'paper' : xaxis._id,
yref: yPaper ? 'paper' : yaxis._id,
- layer: drwStyle.layer,
- opacity: drwStyle.opacity,
+ layer: newStyle.layer,
+ opacity: newStyle.opacity,
line: {
- color: drwStyle.line.color,
- width: drwStyle.line.width,
- dash: drwStyle.line.dash
+ color: newStyle.line.color,
+ width: newStyle.line.width,
+ dash: newStyle.line.dash
}
};
if(!isOpenMode) {
- newShape.fillcolor = drwStyle.fillcolor;
- newShape.fillrule = drwStyle.fillrule;
+ newShape.fillcolor = newStyle.fillcolor;
+ newShape.fillrule = newStyle.fillrule;
}
var cell;
@@ -47053,6 +49283,7 @@ module.exports = function newShapes(outlines, dragOptions) {
if(
cell &&
+ cell.length === 5 && // ensure we only have 4 corners for a rect
dragmode === 'drawrect'
) {
newShape.type = 'rect';
@@ -47141,7 +49372,7 @@ module.exports = function newShapes(outlines, dragOptions) {
cell = null;
}
- clearSelect(gd);
+ clearOutline(gd);
var editHelpers = dragOptions.editHelpers;
var modifyItem = (editHelpers || {}).modifyItem;
@@ -47182,29 +49413,40 @@ module.exports = function newShapes(outlines, dragOptions) {
return editHelpers ? editHelpers.getUpdateObj() : {};
};
-function fixDatesForPaths(polygons, xaxis, yaxis) {
- var xIsDate = xaxis.type === 'date';
- var yIsDate = yaxis.type === 'date';
- if(!xIsDate && !yIsDate) return polygons;
+},{"../../dragelement/helpers":176,"../../selections/helpers":245,".././handle_outline":259,"./constants":255,"./helpers":257}],259:[function(_dereq_,module,exports){
+'use strict';
- for(var i = 0; i < polygons.length; i++) {
- for(var j = 0; j < polygons[i].length; j++) {
- for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
- if(xIsDate) polygons[i][j][k + 1] = polygons[i][j][k + 1].replace(' ', '_');
- if(yIsDate) polygons[i][j][k + 2] = polygons[i][j][k + 2].replace(' ', '_');
- }
- }
+function clearOutlineControllers(gd) {
+ var zoomLayer = gd._fullLayout._zoomlayer;
+ if(zoomLayer) {
+ zoomLayer.selectAll('.outline-controllers').remove();
}
-
- return polygons;
}
-},{"../../../plots/cartesian/handle_outline":345,"../../../plots/cartesian/helpers":346,"../../dragelement/helpers":175,"./constants":243,"./helpers":246}],248:[function(_dereq_,module,exports){
+function clearOutline(gd) {
+ var zoomLayer = gd._fullLayout._zoomlayer;
+ if(zoomLayer) {
+ // until we get around to persistent selections, remove the outline
+ // here. The selection itself will be removed when the plot redraws
+ // at the end.
+ zoomLayer.selectAll('.select-outline').remove();
+ }
+
+ gd._fullLayout._outlining = false;
+}
+
+module.exports = {
+ clearOutlineControllers: clearOutlineControllers,
+ clearOutline: clearOutline
+};
+
+},{}],260:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
var Lib = _dereq_('../../lib');
+var Axes = _dereq_('../../plots/cartesian/axes');
// special position conversion functions... category axis positions can't be
// specified by their data values, because they don't make a continuous mapping.
@@ -47234,7 +49476,7 @@ exports.encodeDate = function(convertToDate) {
return function(v) { return convertToDate(v).replace(' ', '_'); };
};
-exports.extractPathCoords = function(path, paramsToUse) {
+exports.extractPathCoords = function(path, paramsToUse, isRaw) {
var extractedCoordinates = [];
var segments = path.match(constants.segmentRE);
@@ -47245,7 +49487,10 @@ exports.extractPathCoords = function(path, paramsToUse) {
var params = segment.substr(1).match(constants.paramRE);
if(!params || params.length < relevantParamIdx) return;
- extractedCoordinates.push(Lib.cleanNumber(params[relevantParamIdx]));
+ var str = params[relevantParamIdx];
+ var pos = isRaw ? str : Lib.cleanNumber(str);
+
+ extractedCoordinates.push(pos);
});
return extractedCoordinates;
@@ -47324,7 +49569,7 @@ exports.roundPositionForSharpStrokeRendering = function(pos, strokeWidth) {
return strokeWidthIsOdd ? posValAsInt + 0.5 : posValAsInt;
};
-exports.makeOptionsAndPlotinfo = function(gd, index) {
+exports.makeShapesOptionsAndPlotinfo = function(gd, index) {
var options = gd._fullLayout.shapes[index] || {};
var plotinfo = gd._fullLayout._plots[options.xref + options.yref];
@@ -47348,7 +49593,137 @@ exports.makeOptionsAndPlotinfo = function(gd, index) {
};
};
-},{"../../lib":287,"./constants":239}],249:[function(_dereq_,module,exports){
+// TODO: move to selections helpers?
+exports.makeSelectionsOptionsAndPlotinfo = function(gd, index) {
+ var options = gd._fullLayout.selections[index] || {};
+
+ var plotinfo = gd._fullLayout._plots[options.xref + options.yref];
+ var hasPlotinfo = !!plotinfo;
+ if(hasPlotinfo) {
+ plotinfo._hadPlotinfo = true;
+ } else {
+ plotinfo = {};
+ if(options.xref) plotinfo.xaxis = gd._fullLayout[options.xref + 'axis'];
+ if(options.yref) plotinfo.yaxis = gd._fullLayout[options.yref + 'axis'];
+ }
+
+ return {
+ options: options,
+ plotinfo: plotinfo
+ };
+};
+
+
+exports.getPathString = function(gd, options) {
+ var type = options.type;
+ var xRefType = Axes.getRefType(options.xref);
+ var yRefType = Axes.getRefType(options.yref);
+ var xa = Axes.getFromId(gd, options.xref);
+ var ya = Axes.getFromId(gd, options.yref);
+ var gs = gd._fullLayout._size;
+ var x2r, x2p, y2r, y2p;
+ var x0, x1, y0, y1;
+
+ if(xa) {
+ if(xRefType === 'domain') {
+ x2p = function(v) { return xa._offset + xa._length * v; };
+ } else {
+ x2r = exports.shapePositionToRange(xa);
+ x2p = function(v) { return xa._offset + xa.r2p(x2r(v, true)); };
+ }
+ } else {
+ x2p = function(v) { return gs.l + gs.w * v; };
+ }
+
+ if(ya) {
+ if(yRefType === 'domain') {
+ y2p = function(v) { return ya._offset + ya._length * (1 - v); };
+ } else {
+ y2r = exports.shapePositionToRange(ya);
+ y2p = function(v) { return ya._offset + ya.r2p(y2r(v, true)); };
+ }
+ } else {
+ y2p = function(v) { return gs.t + gs.h * (1 - v); };
+ }
+
+ if(type === 'path') {
+ if(xa && xa.type === 'date') x2p = exports.decodeDate(x2p);
+ if(ya && ya.type === 'date') y2p = exports.decodeDate(y2p);
+ return convertPath(options, x2p, y2p);
+ }
+
+ if(options.xsizemode === 'pixel') {
+ var xAnchorPos = x2p(options.xanchor);
+ x0 = xAnchorPos + options.x0;
+ x1 = xAnchorPos + options.x1;
+ } else {
+ x0 = x2p(options.x0);
+ x1 = x2p(options.x1);
+ }
+
+ if(options.ysizemode === 'pixel') {
+ var yAnchorPos = y2p(options.yanchor);
+ y0 = yAnchorPos - options.y0;
+ y1 = yAnchorPos - options.y1;
+ } else {
+ y0 = y2p(options.y0);
+ y1 = y2p(options.y1);
+ }
+
+ if(type === 'line') return 'M' + x0 + ',' + y0 + 'L' + x1 + ',' + y1;
+ if(type === 'rect') return 'M' + x0 + ',' + y0 + 'H' + x1 + 'V' + y1 + 'H' + x0 + 'Z';
+
+ // circle
+ var cx = (x0 + x1) / 2;
+ var cy = (y0 + y1) / 2;
+ var rx = Math.abs(cx - x0);
+ var ry = Math.abs(cy - y0);
+ var rArc = 'A' + rx + ',' + ry;
+ var rightPt = (cx + rx) + ',' + cy;
+ var topPt = cx + ',' + (cy - ry);
+ return 'M' + rightPt + rArc + ' 0 1,1 ' + topPt +
+ rArc + ' 0 0,1 ' + rightPt + 'Z';
+};
+
+
+function convertPath(options, x2p, y2p) {
+ var pathIn = options.path;
+ var xSizemode = options.xsizemode;
+ var ySizemode = options.ysizemode;
+ var xAnchor = options.xanchor;
+ var yAnchor = options.yanchor;
+
+ return pathIn.replace(constants.segmentRE, function(segment) {
+ var paramNumber = 0;
+ var segmentType = segment.charAt(0);
+ var xParams = constants.paramIsX[segmentType];
+ var yParams = constants.paramIsY[segmentType];
+ var nParams = constants.numParams[segmentType];
+
+ var paramString = segment.substr(1).replace(constants.paramRE, function(param) {
+ if(xParams[paramNumber]) {
+ if(xSizemode === 'pixel') param = x2p(xAnchor) + Number(param);
+ else param = x2p(param);
+ } else if(yParams[paramNumber]) {
+ if(ySizemode === 'pixel') param = y2p(yAnchor) - Number(param);
+ else param = y2p(param);
+ }
+ paramNumber++;
+
+ if(paramNumber > nParams) param = 'X';
+ return param;
+ });
+
+ if(paramNumber > nParams) {
+ paramString = paramString.replace(/[\s,]*X.*/, '');
+ Lib.log('Ignoring extra params in segment ' + segment);
+ }
+
+ return segmentType + paramString;
+ });
+}
+
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":250}],261:[function(_dereq_,module,exports){
'use strict';
var drawModule = _dereq_('./draw');
@@ -47367,7 +49742,7 @@ module.exports = {
drawOne: drawModule.drawOne
};
-},{"../../plots/cartesian/include_components":347,"./attributes":237,"./calc_autorange":238,"./defaults":240,"./draw":241,"./draw_newshape/defaults":244}],250:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/include_components":357,"./attributes":248,"./calc_autorange":249,"./defaults":251,"./draw":253,"./draw_newshape/defaults":256}],262:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -47541,7 +49916,7 @@ module.exports = overrideAll(templatedArray('slider', {
}
}), 'arraydraw', 'from-root');
-},{"../../lib/extend":281,"../../plot_api/edit_types":316,"../../plot_api/plot_template":323,"../../plots/animation_attributes":328,"../../plots/font_attributes":365,"../../plots/pad_attributes":370,"./constants":251}],251:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../plots/animation_attributes":340,"../../plots/font_attributes":374,"../../plots/pad_attributes":379,"./constants":263}],263:[function(_dereq_,module,exports){
'use strict';
@@ -47626,7 +50001,7 @@ module.exports = {
currentValueInset: 0,
};
-},{}],252:[function(_dereq_,module,exports){
+},{}],264:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -47733,7 +50108,7 @@ function stepDefaults(valueIn, valueOut) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"./attributes":250,"./constants":251}],253:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"./attributes":262,"./constants":263}],265:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -48367,7 +50742,7 @@ function drawRail(sliderGroup, sliderOpts) {
);
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/svg_text_utils":310,"../../plot_api/plot_template":323,"../../plots/plots":371,"../color":157,"../drawing":179,"./constants":251,"@plotly/d3":20}],254:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/plots":380,"../color":158,"../drawing":180,"./constants":263,"@plotly/d3":20}],266:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -48382,7 +50757,7 @@ module.exports = {
draw: _dereq_('./draw')
};
-},{"./attributes":250,"./constants":251,"./defaults":252,"./draw":253}],255:[function(_dereq_,module,exports){
+},{"./attributes":262,"./constants":263,"./defaults":264,"./draw":265}],267:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -48647,7 +51022,7 @@ module.exports = {
draw: draw
};
-},{"../../constants/alignment":262,"../../constants/interactions":266,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../../registry":378,"../color":157,"../drawing":179,"@plotly/d3":20,"fast-isnumeric":33}],256:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../constants/interactions":278,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"../color":158,"../drawing":180,"@plotly/d3":20,"fast-isnumeric":33}],268:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -48770,7 +51145,7 @@ module.exports = overrideAll(templatedArray('updatemenu', {
}
}), 'arraydraw', 'from-root');
-},{"../../lib/extend":281,"../../plot_api/edit_types":316,"../../plot_api/plot_template":323,"../../plots/font_attributes":365,"../../plots/pad_attributes":370,"../color/attributes":156}],257:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../plots/font_attributes":374,"../../plots/pad_attributes":379,"../color/attributes":157}],269:[function(_dereq_,module,exports){
'use strict';
@@ -48842,7 +51217,7 @@ module.exports = {
}
};
-},{}],258:[function(_dereq_,module,exports){
+},{}],270:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -48917,7 +51292,7 @@ function buttonDefaults(buttonIn, buttonOut) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"./attributes":256,"./constants":257}],259:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"./attributes":268,"./constants":269}],271:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -49559,9 +51934,9 @@ function removeAllButtons(gButton, newMenuIndexAttr) {
.selectAll('g.' + constants.dropdownButtonClassName).remove();
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/svg_text_utils":310,"../../plot_api/plot_template":323,"../../plots/plots":371,"../color":157,"../drawing":179,"./constants":257,"./scrollbox":261,"@plotly/d3":20}],260:[function(_dereq_,module,exports){
-arguments[4][254][0].apply(exports,arguments)
-},{"./attributes":256,"./constants":257,"./defaults":258,"./draw":259,"dup":254}],261:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/plots":380,"../color":158,"../drawing":180,"./constants":269,"./scrollbox":273,"@plotly/d3":20}],272:[function(_dereq_,module,exports){
+arguments[4][266][0].apply(exports,arguments)
+},{"./attributes":268,"./constants":269,"./defaults":270,"./draw":271,"dup":266}],273:[function(_dereq_,module,exports){
'use strict';
module.exports = ScrollBox;
@@ -50018,7 +52393,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY)
}
};
-},{"../../lib":287,"../color":157,"../drawing":179,"@plotly/d3":20}],262:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"../drawing":180,"@plotly/d3":20}],274:[function(_dereq_,module,exports){
'use strict';
// fraction of some size to get to a named position
@@ -50075,7 +52450,7 @@ module.exports = {
}
};
-},{}],263:[function(_dereq_,module,exports){
+},{}],275:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50098,7 +52473,7 @@ module.exports = {
}
};
-},{}],264:[function(_dereq_,module,exports){
+},{}],276:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50106,7 +52481,7 @@ module.exports = {
DATE_FORMAT_LINK: 'https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format'
};
-},{}],265:[function(_dereq_,module,exports){
+},{}],277:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50136,7 +52511,7 @@ module.exports = {
}
};
-},{}],266:[function(_dereq_,module,exports){
+},{}],278:[function(_dereq_,module,exports){
'use strict';
@@ -50151,7 +52526,7 @@ module.exports = {
DESELECTDIM: 0.2
};
-},{}],267:[function(_dereq_,module,exports){
+},{}],279:[function(_dereq_,module,exports){
'use strict';
@@ -50216,7 +52591,7 @@ module.exports = {
MINUS_SIGN: '\u2212'
};
-},{}],268:[function(_dereq_,module,exports){
+},{}],280:[function(_dereq_,module,exports){
'use strict';
@@ -50231,7 +52606,7 @@ exports.svgAttrs = {
'xmlns:xlink': exports.xlink
};
-},{}],269:[function(_dereq_,module,exports){
+},{}],281:[function(_dereq_,module,exports){
'use strict';
exports.version = _dereq_('./version').version;
@@ -50269,6 +52644,7 @@ register([
_dereq_('./components/fx'), // fx needs to come after legend
_dereq_('./components/annotations'),
_dereq_('./components/annotations3d'),
+ _dereq_('./components/selections'),
_dereq_('./components/shapes'),
_dereq_('./components/images'),
_dereq_('./components/updatemenus'),
@@ -50315,7 +52691,7 @@ exports.Fx = {
exports.Snapshot = _dereq_('./snapshot');
exports.PlotSchema = _dereq_('./plot_api/plot_schema');
-},{"../build/plotcss":1,"./components/annotations":148,"./components/annotations3d":153,"./components/colorbar":163,"./components/colorscale":169,"./components/errorbars":185,"./components/fx":197,"./components/grid":201,"./components/images":206,"./components/legend":214,"./components/modebar":220,"./components/rangeselector":228,"./components/rangeslider":235,"./components/shapes":249,"./components/sliders":254,"./components/updatemenus":260,"./fonts/ploticon":270,"./locale-en":314,"./locale-en-us":313,"./plot_api":318,"./plot_api/plot_schema":322,"./plots/plots":371,"./registry":378,"./snapshot":383,"./traces/scatter":512,"./version":552,"native-promise-only":72}],270:[function(_dereq_,module,exports){
+},{"../build/plotcss":1,"./components/annotations":149,"./components/annotations3d":154,"./components/colorbar":164,"./components/colorscale":170,"./components/errorbars":186,"./components/fx":198,"./components/grid":202,"./components/images":207,"./components/legend":215,"./components/modebar":221,"./components/rangeselector":229,"./components/rangeslider":236,"./components/selections":246,"./components/shapes":261,"./components/sliders":266,"./components/updatemenus":272,"./fonts/ploticon":282,"./locale-en":326,"./locale-en-us":325,"./plot_api":330,"./plot_api/plot_schema":334,"./plots/plots":380,"./registry":387,"./snapshot":392,"./traces/scatter":521,"./version":561,"native-promise-only":72}],282:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50483,11 +52859,38 @@ module.exports = {
},
'newplotlylogo': {
'name': 'newplotlylogo',
- 'svg': ''
+ 'svg': [
+ ''
+ ].join('')
}
};
-},{}],271:[function(_dereq_,module,exports){
+},{}],283:[function(_dereq_,module,exports){
'use strict';
@@ -50542,7 +52945,7 @@ exports.isBottomAnchor = function isBottomAnchor(opts) {
);
};
-},{}],272:[function(_dereq_,module,exports){
+},{}],284:[function(_dereq_,module,exports){
'use strict';
var modModule = _dereq_('./mod');
@@ -50775,7 +53178,7 @@ module.exports = {
pathAnnulus: pathAnnulus
};
-},{"./mod":294}],273:[function(_dereq_,module,exports){
+},{"./mod":306}],285:[function(_dereq_,module,exports){
'use strict';
var isArray = Array.isArray;
@@ -50917,7 +53320,7 @@ function _rowLength(z, fn, len0) {
return 0;
}
-},{}],274:[function(_dereq_,module,exports){
+},{}],286:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -50941,7 +53344,7 @@ module.exports = function cleanNumber(v) {
return BADNUM;
};
-},{"../constants/numerical":267,"fast-isnumeric":33}],275:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"fast-isnumeric":33}],287:[function(_dereq_,module,exports){
'use strict';
/**
@@ -50961,7 +53364,7 @@ module.exports = function clearGlCanvases(gd) {
}
};
-},{}],276:[function(_dereq_,module,exports){
+},{}],288:[function(_dereq_,module,exports){
'use strict';
/**
@@ -50976,7 +53379,7 @@ module.exports = function clearResponsive(gd) {
}
};
-},{}],277:[function(_dereq_,module,exports){
+},{}],289:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -51107,14 +53510,14 @@ exports.valObjectMeta = {
},
flaglist: {
coerceFunction: function(v, propOut, dflt, opts) {
- if(typeof v !== 'string') {
- propOut.set(dflt);
- return;
- }
if((opts.extras || []).indexOf(v) !== -1) {
propOut.set(v);
return;
}
+ if(typeof v !== 'string') {
+ propOut.set(dflt);
+ return;
+ }
var vParts = v.split('+');
var i = 0;
while(i < vParts.length) {
@@ -51421,7 +53824,7 @@ function validate(value, opts) {
}
exports.validate = validate;
-},{"../components/color":157,"../components/colorscale/scales":172,"../constants/interactions":266,"../plots/attributes":330,"./array":273,"./mod":294,"./nested_property":295,"./regex":303,"fast-isnumeric":33,"tinycolor2":121}],278:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/colorscale/scales":173,"../constants/interactions":278,"../plots/attributes":342,"./array":285,"./mod":306,"./nested_property":307,"./regex":315,"fast-isnumeric":33,"tinycolor2":122}],290:[function(_dereq_,module,exports){
'use strict';
var timeFormat = _dereq_('d3-time-format').timeFormat;
@@ -52025,7 +54428,7 @@ exports.findExactDates = function(data, calendar) {
};
};
-},{"../constants/numerical":267,"../registry":378,"./loggers":291,"./mod":294,"d3-time-format":30,"fast-isnumeric":33}],279:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"../registry":387,"./loggers":303,"./mod":306,"d3-time-format":30,"fast-isnumeric":33}],291:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -52195,7 +54598,7 @@ module.exports = {
equalDomRects: equalDomRects
};
-},{"./loggers":291,"./matrix":293,"@plotly/d3":20,"gl-mat4":49}],280:[function(_dereq_,module,exports){
+},{"./loggers":303,"./matrix":305,"@plotly/d3":20,"gl-mat4":49}],292:[function(_dereq_,module,exports){
'use strict';
/* global jQuery:false */
@@ -52359,7 +54762,7 @@ var Events = {
module.exports = Events;
-},{"events":27}],281:[function(_dereq_,module,exports){
+},{"events":27}],293:[function(_dereq_,module,exports){
'use strict';
var isPlainObject = _dereq_('./is_plain_object.js');
@@ -52464,7 +54867,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) {
return target;
}
-},{"./is_plain_object.js":288}],282:[function(_dereq_,module,exports){
+},{"./is_plain_object.js":300}],294:[function(_dereq_,module,exports){
'use strict';
@@ -52506,7 +54909,7 @@ module.exports = function filterUnique(array) {
return out;
};
-},{}],283:[function(_dereq_,module,exports){
+},{}],295:[function(_dereq_,module,exports){
'use strict';
/** Filter out object items with visible !== true
@@ -52546,7 +54949,7 @@ function isCalcData(cont) {
);
}
-},{}],284:[function(_dereq_,module,exports){
+},{}],296:[function(_dereq_,module,exports){
'use strict';
var mod = _dereq_('./mod').mod;
@@ -52782,7 +55185,7 @@ exports.findPointOnPath = function findPointOnPath(path, val, coord, opts) {
return pt;
};
-},{"./mod":294}],285:[function(_dereq_,module,exports){
+},{"./mod":306}],297:[function(_dereq_,module,exports){
'use strict';
// Simple helper functions
@@ -52790,7 +55193,7 @@ exports.findPointOnPath = function findPointOnPath(path, val, coord, opts) {
module.exports = function identity(d) { return d; };
-},{}],286:[function(_dereq_,module,exports){
+},{}],298:[function(_dereq_,module,exports){
'use strict';
module.exports = function incrementNumeric(x, delta) {
@@ -52823,7 +55226,7 @@ module.exports = function incrementNumeric(x, delta) {
return newX;
};
-},{}],287:[function(_dereq_,module,exports){
+},{}],299:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -54211,7 +56614,7 @@ lib.getPositionFromD3Event = function() {
}
};
-},{"../constants/numerical":267,"./anchor_utils":271,"./angles":272,"./array":273,"./clean_number":274,"./clear_responsive":276,"./coerce":277,"./dates":278,"./dom":279,"./extend":281,"./filter_unique":282,"./filter_visible":283,"./geometry2d":284,"./identity":285,"./increment":286,"./is_plain_object":288,"./keyed_container":289,"./localize":290,"./loggers":291,"./make_trace_groups":292,"./matrix":293,"./mod":294,"./nested_property":295,"./noop":296,"./notifier":297,"./preserve_drawing_buffer":300,"./push_unique":301,"./regex":303,"./relative_attr":304,"./relink_private":305,"./search":306,"./sort_object_keys":308,"./stats":309,"./throttle":311,"./to_log_range":312,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],288:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"./anchor_utils":283,"./angles":284,"./array":285,"./clean_number":286,"./clear_responsive":288,"./coerce":289,"./dates":290,"./dom":291,"./extend":293,"./filter_unique":294,"./filter_visible":295,"./geometry2d":296,"./identity":297,"./increment":298,"./is_plain_object":300,"./keyed_container":301,"./localize":302,"./loggers":303,"./make_trace_groups":304,"./matrix":305,"./mod":306,"./nested_property":307,"./noop":308,"./notifier":309,"./preserve_drawing_buffer":312,"./push_unique":313,"./regex":315,"./relative_attr":316,"./relink_private":317,"./search":318,"./sort_object_keys":320,"./stats":321,"./throttle":323,"./to_log_range":324,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],300:[function(_dereq_,module,exports){
'use strict';
// more info: http://stackoverflow.com/questions/18531624/isplainobject-thing
@@ -54230,7 +56633,7 @@ module.exports = function isPlainObject(obj) {
);
};
-},{}],289:[function(_dereq_,module,exports){
+},{}],301:[function(_dereq_,module,exports){
'use strict';
var nestedProperty = _dereq_('./nested_property');
@@ -54415,7 +56818,7 @@ module.exports = function keyedContainer(baseObj, path, keyName, valueName) {
return obj;
};
-},{"./nested_property":295}],290:[function(_dereq_,module,exports){
+},{"./nested_property":307}],302:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -54462,7 +56865,7 @@ module.exports = function localize(gd, s) {
return s;
};
-},{"../registry":378}],291:[function(_dereq_,module,exports){
+},{"../registry":387}],303:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable no-console */
@@ -54539,7 +56942,7 @@ loggers.error = function() {
}
};
-},{"../plot_api/plot_config":321,"./notifier":297}],292:[function(_dereq_,module,exports){
+},{"../plot_api/plot_config":333,"./notifier":309}],304:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -54574,7 +56977,7 @@ module.exports = function makeTraceGroups(traceLayer, cdModule, cls) {
return traces;
};
-},{"@plotly/d3":20}],293:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],305:[function(_dereq_,module,exports){
'use strict';
var mat4X4 = _dereq_('gl-mat4');
@@ -54717,7 +57120,7 @@ exports.inverseTransformMatrix = function(m) {
];
};
-},{"gl-mat4":49}],294:[function(_dereq_,module,exports){
+},{"gl-mat4":49}],306:[function(_dereq_,module,exports){
'use strict';
/**
@@ -54744,7 +57147,7 @@ module.exports = {
modHalf: modHalf
};
-},{}],295:[function(_dereq_,module,exports){
+},{}],307:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -54981,7 +57384,7 @@ function badContainer(container, propStr, propParts) {
};
}
-},{"./array":273,"fast-isnumeric":33}],296:[function(_dereq_,module,exports){
+},{"./array":285,"fast-isnumeric":33}],308:[function(_dereq_,module,exports){
'use strict';
// Simple helper functions
@@ -54989,7 +57392,7 @@ function badContainer(container, propStr, propParts) {
module.exports = function noop() {};
-},{}],297:[function(_dereq_,module,exports){
+},{}],309:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -55068,7 +57471,7 @@ module.exports = function(text, displayLength) {
});
};
-},{"@plotly/d3":20,"fast-isnumeric":33}],298:[function(_dereq_,module,exports){
+},{"@plotly/d3":20,"fast-isnumeric":33}],310:[function(_dereq_,module,exports){
'use strict';
var setCursor = _dereq_('./setcursor');
@@ -55107,7 +57510,7 @@ module.exports = function overrideCursor(el3, csr) {
}
};
-},{"./setcursor":307}],299:[function(_dereq_,module,exports){
+},{"./setcursor":319}],311:[function(_dereq_,module,exports){
'use strict';
var dot = _dereq_('./matrix').dot;
@@ -55139,7 +57542,14 @@ polygon.tester = function tester(ptsIn) {
var ymax = ymin;
var i;
- pts.push(pts[0]);
+ if(
+ pts[pts.length - 1][0] !== pts[0][0] ||
+ pts[pts.length - 1][1] !== pts[0][1]
+ ) {
+ // close the polygon
+ pts.push(pts[0]);
+ }
+
for(i = 1; i < pts.length; i++) {
xmin = Math.min(xmin, pts[i][0]);
xmax = Math.max(xmax, pts[i][0]);
@@ -55350,7 +57760,7 @@ polygon.filter = function filter(pts, tolerance) {
};
};
-},{"../constants/numerical":267,"./matrix":293}],300:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"./matrix":305}],312:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -55412,7 +57822,7 @@ function getUserAgent() {
return ua;
}
-},{"fast-isnumeric":33,"is-mobile":69}],301:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33,"is-mobile":69}],313:[function(_dereq_,module,exports){
'use strict';
/**
@@ -55442,7 +57852,7 @@ module.exports = function pushUnique(array, item) {
return array;
};
-},{}],302:[function(_dereq_,module,exports){
+},{}],314:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -55634,7 +58044,7 @@ queue.plotDo = function(gd, func, args) {
module.exports = queue;
-},{"../lib":287,"../plot_api/plot_config":321}],303:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_config":333}],315:[function(_dereq_,module,exports){
'use strict';
/*
@@ -55656,7 +58066,7 @@ exports.counter = function(head, tail, openEnded, matchBeginning) {
return new RegExp(startWithPrefix + head + '([2-9]|[1-9][0-9]+)?' + fullTail);
};
-},{}],304:[function(_dereq_,module,exports){
+},{}],316:[function(_dereq_,module,exports){
'use strict';
// ASCEND: chop off the last nesting level - either [] or . - to ascend
@@ -55700,7 +58110,7 @@ module.exports = function(baseAttr, relativeAttr) {
return baseAttr + relativeAttr;
};
-},{}],305:[function(_dereq_,module,exports){
+},{}],317:[function(_dereq_,module,exports){
'use strict';
var isArrayOrTypedArray = _dereq_('./array').isArrayOrTypedArray;
@@ -55748,7 +58158,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) {
}
};
-},{"./array":273,"./is_plain_object":288}],306:[function(_dereq_,module,exports){
+},{"./array":285,"./is_plain_object":300}],318:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -55940,7 +58350,7 @@ exports.findIndexOfMin = function(arr, fn) {
return ind;
};
-},{"../constants/numerical":267,"./identity":285,"./loggers":291,"fast-isnumeric":33}],307:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"./identity":297,"./loggers":303,"fast-isnumeric":33}],319:[function(_dereq_,module,exports){
'use strict';
// works with our CSS cursor classes (see css/_cursor.scss)
@@ -55954,14 +58364,14 @@ module.exports = function setCursor(el3, csr) {
if(csr) el3.classed('cursor-' + csr, true);
};
-},{}],308:[function(_dereq_,module,exports){
+},{}],320:[function(_dereq_,module,exports){
'use strict';
module.exports = function sortObjectKeys(obj) {
return Object.keys(obj).sort();
};
-},{}],309:[function(_dereq_,module,exports){
+},{}],321:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -56041,7 +58451,7 @@ exports.median = function(data) {
/**
* interp() computes a percentile (quantile) for a given distribution.
* We interpolate the distribution (to compute quantiles, we follow method #10 here:
- * http://www.amstat.org/publications/jse/v14n3/langford.html).
+ * http://jse.amstat.org/v14n3/langford.html).
* Typically the index or rank (n * arr.length) may be non-integer.
* For reference: ends are clipped to the extreme values in the array;
* For box plots: index you get is half a point too high (see
@@ -56062,7 +58472,7 @@ exports.interp = function(arr, n) {
return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)];
};
-},{"./array":273,"fast-isnumeric":33}],310:[function(_dereq_,module,exports){
+},{"./array":285,"fast-isnumeric":33}],322:[function(_dereq_,module,exports){
'use strict';
/* global MathJax:false */
@@ -57078,7 +59488,7 @@ exports.makeEditable = function(context, options) {
return d3.rebind(context, dispatch, 'on');
};
-},{"../constants/alignment":262,"../constants/xmlns_namespaces":268,"../lib":287,"@plotly/d3":20}],311:[function(_dereq_,module,exports){
+},{"../constants/alignment":274,"../constants/xmlns_namespaces":280,"../lib":299,"@plotly/d3":20}],323:[function(_dereq_,module,exports){
'use strict';
var timerCache = {};
@@ -57173,7 +59583,7 @@ function _clearTimeout(cache) {
}
}
-},{}],312:[function(_dereq_,module,exports){
+},{}],324:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -57193,7 +59603,7 @@ module.exports = function toLogRange(val, range) {
return newVal;
};
-},{"fast-isnumeric":33}],313:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33}],325:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -57207,7 +59617,7 @@ module.exports = {
}
};
-},{}],314:[function(_dereq_,module,exports){
+},{}],326:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -57242,7 +59652,7 @@ module.exports = {
}
};
-},{}],315:[function(_dereq_,module,exports){
+},{}],327:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -57291,7 +59701,7 @@ module.exports = function containerArrayMatch(astr) {
return {array: arrayStr, index: Number(match[1]), property: match[3] || ''};
};
-},{"../registry":378}],316:[function(_dereq_,module,exports){
+},{"../registry":387}],328:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -57406,7 +59816,7 @@ function overrideOne(attr, editTypeOverride, overrideContainers, key) {
}
}
-},{"../lib":287}],317:[function(_dereq_,module,exports){
+},{"../lib":299}],329:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -58100,7 +60510,7 @@ exports.clearAxisTypes = function(gd, traces, layoutUpdate) {
}
};
-},{"../components/color":157,"../lib":287,"../plots/cartesian/axis_ids":338,"../plots/plots":371,"../registry":378,"fast-isnumeric":33,"gl-mat4/fromQuat":39}],318:[function(_dereq_,module,exports){
+},{"../components/color":158,"../lib":299,"../plots/cartesian/axis_ids":350,"../plots/plots":380,"../registry":387,"fast-isnumeric":33,"gl-mat4/fromQuat":39}],330:[function(_dereq_,module,exports){
'use strict';
var main = _dereq_('./plot_api');
@@ -58135,7 +60545,7 @@ var templateApi = _dereq_('./template_api');
exports.makeTemplate = templateApi.makeTemplate;
exports.validateTemplate = templateApi.validateTemplate;
-},{"../snapshot/download":380,"./plot_api":320,"./template_api":325,"./to_image":326,"./validate":327}],319:[function(_dereq_,module,exports){
+},{"../snapshot/download":389,"./plot_api":332,"./template_api":337,"./to_image":338,"./validate":339}],331:[function(_dereq_,module,exports){
'use strict';
var isPlainObject = _dereq_('../lib/is_plain_object');
@@ -58339,7 +60749,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np,
return true;
};
-},{"../lib/is_plain_object":288,"../lib/loggers":291,"../lib/noop":296,"../lib/search":306,"../registry":378,"./container_array_match":315}],320:[function(_dereq_,module,exports){
+},{"../lib/is_plain_object":300,"../lib/loggers":303,"../lib/noop":308,"../lib/search":318,"../registry":387,"./container_array_match":327}],332:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -58361,7 +60771,7 @@ var Drawing = _dereq_('../components/drawing');
var Color = _dereq_('../components/color');
var initInteractions = _dereq_('../plots/cartesian/graph_interact').initInteractions;
var xmlnsNamespaces = _dereq_('../constants/xmlns_namespaces');
-var clearSelect = _dereq_('../plots/cartesian/select').clearSelect;
+var clearOutline = _dereq_('../components/selections').clearOutline;
var dfltConfig = _dereq_('./plot_config').dfltConfig;
var manageArrays = _dereq_('./manage_arrays');
@@ -58711,6 +61121,7 @@ function _doPlot(gd, data, layout, config) {
Plots.addLinks,
Plots.rehover,
Plots.redrag,
+ Plots.reselect,
// TODO: doAutoMargin is only needed here for axis automargin, which
// happens outside of marginPushers where all the other automargins are
// calculated. Would be much better to separate margin calculations from
@@ -59641,7 +62052,11 @@ function restyle(gd, astr, val, _traces) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
Queue.add(gd,
restyle, [gd, specs.undoit, specs.traces],
@@ -60143,7 +62558,11 @@ function relayout(gd, astr, val) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
Queue.add(gd,
relayout, [gd, specs.undoit],
@@ -60232,7 +62651,7 @@ function addAxRangeSequence(seq, rangesAltered) {
};
seq.push(
- clearSelect,
+ clearOutline,
subroutines.doAutoRangeAndConstraints,
drawAxes,
subroutines.drawData,
@@ -60656,7 +63075,11 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
Queue.add(gd,
update, [gd, restyleSpecs.undoit, relayoutSpecs.undoit, restyleSpecs.traces],
@@ -61092,7 +63515,11 @@ function react(gd, data, layout, config) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
plotDone = Lib.syncOrAsync(seq, gd);
if(!plotDone || !plotDone.then) plotDone = Promise.resolve(gd);
@@ -62143,6 +64570,7 @@ function makePlotFramework(gd) {
fullLayout._shapeUpperLayer = layerAbove.append('g')
.classed('shapelayer', true);
+ fullLayout._selectionLayer = fullLayout._toppaper.append('g').classed('selectionlayer', true);
fullLayout._infolayer = fullLayout._toppaper.append('g').classed('infolayer', true);
fullLayout._menulayer = fullLayout._toppaper.append('g').classed('menulayer', true);
fullLayout._zoomlayer = fullLayout._toppaper.append('g').classed('zoomlayer', true);
@@ -62187,7 +64615,7 @@ exports._guiUpdate = guiEdit(update);
exports._storeDirectGUIEdit = _storeDirectGUIEdit;
-},{"../components/color":157,"../components/drawing":179,"../constants/xmlns_namespaces":268,"../lib":287,"../lib/events":280,"../lib/queue":302,"../plots/cartesian/axes":334,"../plots/cartesian/constants":341,"../plots/cartesian/graph_interact":344,"../plots/cartesian/select":355,"../plots/plots":371,"../registry":378,"./edit_types":316,"./helpers":317,"./manage_arrays":319,"./plot_config":321,"./plot_schema":322,"./subroutines":324,"@plotly/d3":20,"fast-isnumeric":33,"has-hover":64}],321:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/drawing":180,"../components/selections":246,"../constants/xmlns_namespaces":280,"../lib":299,"../lib/events":292,"../lib/queue":314,"../plots/cartesian/axes":346,"../plots/cartesian/constants":353,"../plots/cartesian/graph_interact":356,"../plots/plots":380,"../registry":387,"./edit_types":328,"./helpers":329,"./manage_arrays":331,"./plot_config":333,"./plot_schema":334,"./subroutines":336,"@plotly/d3":20,"fast-isnumeric":33,"has-hover":64}],333:[function(_dereq_,module,exports){
'use strict';
/**
@@ -62453,7 +64881,7 @@ module.exports = {
dfltConfig: dfltConfig
};
-},{}],322:[function(_dereq_,module,exports){
+},{}],334:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -63118,7 +65546,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) {
np.set(extendDeepAll(np.get() || {}, newAttrs));
}
-},{"../lib":287,"../plots/animation_attributes":328,"../plots/attributes":330,"../plots/frame_attributes":366,"../plots/layout_attributes":369,"../registry":378,"./edit_types":316,"./plot_config":321}],323:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/animation_attributes":340,"../plots/attributes":342,"../plots/frame_attributes":375,"../plots/layout_attributes":378,"../registry":387,"./edit_types":328,"./plot_config":333}],335:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -63417,7 +65845,7 @@ exports.arrayEditor = function(parentIn, containerStr, itemOut) {
};
};
-},{"../lib":287,"../plots/attributes":330}],324:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/attributes":342}],336:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -64012,6 +66440,7 @@ exports.drawData = function(gd) {
// draw components that can be drawn on axes,
// and that do not push the margins
+ Registry.getComponentMethod('selections', 'draw')(gd);
Registry.getComponentMethod('shapes', 'draw')(gd);
Registry.getComponentMethod('annotations', 'draw')(gd);
Registry.getComponentMethod('images', 'draw')(gd);
@@ -64133,7 +66562,7 @@ exports.drawMarginPushers = function(gd) {
Registry.getComponentMethod('colorbar', 'draw')(gd);
};
-},{"../components/color":157,"../components/drawing":179,"../components/modebar":220,"../components/titles":255,"../constants/alignment":262,"../lib":287,"../lib/clear_gl_canvases":275,"../plots/cartesian/autorange":333,"../plots/cartesian/axes":334,"../plots/cartesian/constraints":342,"../plots/plots":371,"../registry":378,"@plotly/d3":20}],325:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/drawing":180,"../components/modebar":221,"../components/titles":267,"../constants/alignment":274,"../lib":299,"../lib/clear_gl_canvases":287,"../plots/cartesian/autorange":345,"../plots/cartesian/axes":346,"../plots/cartesian/constraints":354,"../plots/plots":380,"../registry":387,"@plotly/d3":20}],337:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -64586,7 +67015,7 @@ function format(opts) {
return opts;
}
-},{"../lib":287,"../plots/attributes":330,"../plots/plots":371,"./plot_config":321,"./plot_schema":322,"./plot_template":323}],326:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/attributes":342,"../plots/plots":380,"./plot_config":333,"./plot_schema":334,"./plot_template":335}],338:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -64793,7 +67222,7 @@ function toImage(gd, opts) {
module.exports = toImage;
-},{"../lib":287,"../plots/plots":371,"../snapshot/helpers":382,"../snapshot/svgtoimg":384,"../snapshot/tosvg":386,"../version":552,"./plot_api":320,"fast-isnumeric":33}],327:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/plots":380,"../snapshot/helpers":391,"../snapshot/svgtoimg":393,"../snapshot/tosvg":395,"../version":561,"./plot_api":332,"fast-isnumeric":33}],339:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -65216,7 +67645,7 @@ function convertPathToAttributeString(path) {
return astr;
}
-},{"../lib":287,"../plots/plots":371,"./plot_config":321,"./plot_schema":322}],328:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/plots":380,"./plot_config":333,"./plot_schema":334}],340:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -65304,7 +67733,7 @@ module.exports = {
}
};
-},{}],329:[function(_dereq_,module,exports){
+},{}],341:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -65391,7 +67820,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut
return contOut;
};
-},{"../lib":287,"../plot_api/plot_template":323}],330:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_template":335}],342:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('./font_attributes');
@@ -65513,7 +67942,7 @@ module.exports = {
}
};
-},{"../components/fx/attributes":188,"./font_attributes":365}],331:[function(_dereq_,module,exports){
+},{"../components/fx/attributes":189,"./font_attributes":374}],343:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -65608,7 +68037,7 @@ module.exports = function alignPeriod(trace, ax, axLetter, vals) {
};
};
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],332:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],344:[function(_dereq_,module,exports){
'use strict';
@@ -65625,7 +68054,7 @@ module.exports = {
}
};
-},{}],333:[function(_dereq_,module,exports){
+},{}],345:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -66252,7 +68681,7 @@ function goodNumber(v) {
function lessOrEqual(v0, v1) { return v0 <= v1; }
function greaterOrEqual(v0, v1) { return v0 >= v1; }
-},{"../../components/drawing":179,"../../constants/numerical":267,"../../lib":287,"../../registry":378,"./axis_ids":338,"@plotly/d3":20,"fast-isnumeric":33}],334:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../constants/numerical":279,"../../lib":299,"../../registry":387,"./axis_ids":350,"@plotly/d3":20,"fast-isnumeric":33}],346:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -66294,6 +68723,14 @@ var GRID_PATH = { K: 'gridline', L: 'path' };
var MINORGRID_PATH = { K: 'minor-gridline', L: 'path' };
var TICK_PATH = { K: 'tick', L: 'path' };
var TICK_TEXT = { K: 'tick', L: 'text' };
+var MARGIN_MAPPING = {
+ width: ['x', 'r', 'l', 'xl', 'xr'],
+ height: ['y', 't', 'b', 'yt', 'yb'],
+ right: ['r', 'xr'],
+ left: ['l', 'xl'],
+ top: ['t', 'yt'],
+ bottom: ['b', 'yb']
+};
var alignmentConstants = _dereq_('../../constants/alignment');
var MID_SHIFT = alignmentConstants.MID_SHIFT;
@@ -66460,6 +68897,7 @@ axes.redrawComponents = function(gd, axIds) {
_redrawOneComp('annotations', 'drawOne', '_annIndices');
_redrawOneComp('shapes', 'drawOne', '_shapeIndices');
_redrawOneComp('images', 'draw', '_imgIndices', true);
+ _redrawOneComp('selections', 'drawOne', '_selectionIndices');
};
var getDataConversions = axes.getDataConversions = function(gd, trace, target, targetArray) {
@@ -68877,6 +71315,11 @@ axes.drawOne = function(gd, ax, opts) {
rangeSliderPush = Registry.getComponentMethod('rangeslider', 'autoMarginOpts')(gd, ax);
}
+ if(typeof ax.automargin === 'string') {
+ filterPush(push, ax.automargin);
+ filterPush(mirrorPush, ax.automargin);
+ }
+
Plots.autoMargin(gd, axAutoMarginID(ax), push);
Plots.autoMargin(gd, axMirrorAutoMarginID(ax), mirrorPush);
Plots.autoMargin(gd, rangeSliderAutoMarginID(ax), rangeSliderPush);
@@ -68891,6 +71334,23 @@ axes.drawOne = function(gd, ax, opts) {
return Lib.syncOrAsync(seq);
};
+function filterPush(push, automargin) {
+ if(!push) return;
+
+ var keepMargin = Object.keys(MARGIN_MAPPING).reduce(function(data, nextKey) {
+ if(automargin.indexOf(nextKey) !== -1) {
+ MARGIN_MAPPING[nextKey].forEach(function(key) { data[key] = 1;});
+ }
+ return data;
+ }, {});
+ Object.keys(push).forEach(function(key) {
+ if(!keepMargin[key]) {
+ if(key.length === 1) push[key] = 0;
+ else delete push[key];
+ }
+ });
+}
+
function getBoundaryVals(ax, vals) {
var out = [];
var i;
@@ -70436,7 +72896,7 @@ function hideCounterAxisInsideTickLabels(ax, opts) {
}
}
-},{"../../components/color":157,"../../components/drawing":179,"../../components/titles":255,"../../constants/alignment":262,"../../constants/numerical":267,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../../registry":378,"./autorange":333,"./axis_autotype":335,"./axis_ids":338,"./clean_ticks":340,"./layout_attributes":349,"./set_convert":356,"@plotly/d3":20,"fast-isnumeric":33}],335:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../components/titles":267,"../../constants/alignment":274,"../../constants/numerical":279,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"./autorange":345,"./axis_autotype":347,"./axis_ids":350,"./clean_ticks":352,"./layout_attributes":359,"./set_convert":365,"@plotly/d3":20,"fast-isnumeric":33}],347:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -70558,7 +73018,7 @@ function multiCategory(a) {
return isArrayOrTypedArray(a[0]) && isArrayOrTypedArray(a[1]);
}
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],336:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],348:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -70901,7 +73361,7 @@ function indexOfDay(v) {
];
}
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378,"../array_container_defaults":329,"./category_order_defaults":339,"./constants":341,"./layout_attributes":349,"./line_grid_defaults":351,"./prefix_suffix_defaults":353,"./set_convert":356,"./tick_label_defaults":358,"./tick_mark_defaults":359,"./tick_value_defaults":360,"fast-isnumeric":33}],337:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"../array_container_defaults":341,"./category_order_defaults":351,"./constants":353,"./layout_attributes":359,"./line_grid_defaults":361,"./prefix_suffix_defaults":363,"./set_convert":365,"./tick_label_defaults":367,"./tick_mark_defaults":368,"./tick_value_defaults":369,"fast-isnumeric":33}],349:[function(_dereq_,module,exports){
'use strict';
var docs = _dereq_('../../constants/docs');
@@ -70950,7 +73410,7 @@ module.exports = {
descriptionWithDates: descriptionWithDates
};
-},{"../../constants/docs":264}],338:[function(_dereq_,module,exports){
+},{"../../constants/docs":276}],350:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -71098,7 +73558,7 @@ exports.isLinked = function(fullLayout, axId) {
);
};
-},{"../../registry":378,"./constants":341}],339:[function(_dereq_,module,exports){
+},{"../../registry":387,"./constants":353}],351:[function(_dereq_,module,exports){
'use strict';
function findCategories(ax, opts) {
@@ -71184,7 +73644,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut,
}
};
-},{}],340:[function(_dereq_,module,exports){
+},{}],352:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -71268,7 +73728,7 @@ exports.tick0 = function(tick0, axType, calendar, dtick) {
return isNumeric(tick0) ? Number(tick0) : 0;
};
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],341:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],353:[function(_dereq_,module,exports){
'use strict';
var counterRegex = _dereq_('../../lib/regex').counter;
@@ -71300,27 +73760,15 @@ module.exports = {
// pixels to move mouse before you stop clamping to starting point
MINDRAG: 8,
- // smallest dimension allowed for a select box
- MINSELECT: 12,
-
// smallest dimension allowed for a zoombox
MINZOOM: 20,
// width of axis drag regions
DRAGGERSIZE: 20,
- // max pixels off straight before a lasso select line counts as bent
- BENDPX: 1.5,
-
// delay before a redraw (relayout) after smooth panning and zooming
REDRAWDELAY: 50,
- // throttling limit (ms) for selectPoints calls
- SELECTDELAY: 100,
-
- // cache ID suffix for throttle
- SELECTID: '-select',
-
// last resort axis ranges for x and y axes if we have no data
DFLTRANGEX: [-1, 6],
DFLTRANGEY: [-1, 4],
@@ -71352,7 +73800,7 @@ module.exports = {
}
};
-},{"../../lib/regex":303}],342:[function(_dereq_,module,exports){
+},{"../../lib/regex":315}],354:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -71995,7 +74443,7 @@ function updateDomain(ax, factor) {
ax.setScale();
}
-},{"../../constants/alignment":262,"../../constants/numerical":267,"../../lib":287,"./autorange":333,"./axis_ids":338,"./layout_attributes":349,"./scale_zoom":354,"./set_convert":356}],343:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../constants/numerical":279,"../../lib":299,"./autorange":345,"./axis_ids":350,"./layout_attributes":359,"./scale_zoom":364,"./set_convert":365}],355:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -72024,9 +74472,9 @@ var redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;
var Plots = _dereq_('../plots');
var getFromId = _dereq_('./axis_ids').getFromId;
-var prepSelect = _dereq_('./select').prepSelect;
-var clearSelect = _dereq_('./select').clearSelect;
-var selectOnClick = _dereq_('./select').selectOnClick;
+var prepSelect = _dereq_('../../components/selections').prepSelect;
+var clearOutline = _dereq_('../../components/selections').clearOutline;
+var selectOnClick = _dereq_('../../components/selections').selectOnClick;
var scaleZoom = _dereq_('./scale_zoom');
var constants = _dereq_('./constants');
@@ -72229,9 +74677,6 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
updateSubplots([0, 0, pw, ph]);
dragOptions.moveFn(dragDataNow.dx, dragDataNow.dy);
}
-
- // TODO should we try to "re-select" under select/lasso modes?
- // probably best to wait for https://github.com/plotly/plotly.js/issues/1851
}
};
};
@@ -72240,7 +74685,7 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
// clear selection polygon cache (if any)
dragOptions.plotinfo.selection = false;
// clear selection outlines
- clearSelect(gd);
+ clearOutline(gd);
}
function clickFn(numClicks, evt) {
@@ -73327,7 +75772,7 @@ module.exports = {
attachWheelEventHandler: attachWheelEventHandler
};
-},{"../../components/color":157,"../../components/dragelement":176,"../../components/dragelement/helpers":175,"../../components/drawing":179,"../../components/fx":197,"../../constants/alignment":262,"../../lib":287,"../../lib/clear_gl_canvases":275,"../../lib/setcursor":307,"../../lib/svg_text_utils":310,"../../plot_api/subroutines":324,"../../registry":378,"../plots":371,"./axes":334,"./axis_ids":338,"./constants":341,"./scale_zoom":354,"./select":355,"@plotly/d3":20,"has-passive-events":65,"tinycolor2":121}],344:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/dragelement":177,"../../components/dragelement/helpers":176,"../../components/drawing":180,"../../components/fx":198,"../../components/selections":246,"../../constants/alignment":274,"../../lib":299,"../../lib/clear_gl_canvases":287,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plot_api/subroutines":336,"../../registry":387,"../plots":380,"./axes":346,"./axis_ids":350,"./constants":353,"./scale_zoom":364,"@plotly/d3":20,"has-passive-events":65,"tinycolor2":122}],356:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -73486,82 +75931,7 @@ exports.updateFx = function(gd) {
setCursor(fullLayout._draggers, cursor);
};
-},{"../../components/dragelement":176,"../../components/fx":197,"../../lib/setcursor":307,"./constants":341,"./dragbox":343,"@plotly/d3":20}],345:[function(_dereq_,module,exports){
-'use strict';
-
-function clearOutlineControllers(gd) {
- var zoomLayer = gd._fullLayout._zoomlayer;
- if(zoomLayer) {
- zoomLayer.selectAll('.outline-controllers').remove();
- }
-}
-
-function clearSelect(gd) {
- var zoomLayer = gd._fullLayout._zoomlayer;
- if(zoomLayer) {
- // until we get around to persistent selections, remove the outline
- // here. The selection itself will be removed when the plot redraws
- // at the end.
- zoomLayer.selectAll('.select-outline').remove();
- }
-
- gd._fullLayout._drawing = false;
-}
-
-module.exports = {
- clearOutlineControllers: clearOutlineControllers,
- clearSelect: clearSelect
-};
-
-},{}],346:[function(_dereq_,module,exports){
-'use strict';
-
-var strTranslate = _dereq_('../../lib').strTranslate;
-
-// in v3 (once log ranges are fixed),
-// we'll be able to p2r here for all axis types
-function p2r(ax, v) {
- switch(ax.type) {
- case 'log':
- return ax.p2d(v);
- case 'date':
- return ax.p2r(v, 0, ax.calendar);
- default:
- return ax.p2r(v);
- }
-}
-
-function r2p(ax, v) {
- switch(ax.type) {
- case 'log':
- return ax.d2p(v);
- case 'date':
- return ax.r2p(v, 0, ax.calendar);
- default:
- return ax.r2p(v);
- }
-}
-
-function axValue(ax) {
- var index = (ax._id.charAt(0) === 'y') ? 1 : 0;
- return function(v) { return p2r(ax, v[index]); };
-}
-
-function getTransform(plotinfo) {
- return strTranslate(
- plotinfo.xaxis._offset,
- plotinfo.yaxis._offset
- );
-}
-
-module.exports = {
- p2r: p2r,
- r2p: r2p,
- axValue: axValue,
- getTransform: getTransform
-};
-
-},{"../../lib":287}],347:[function(_dereq_,module,exports){
+},{"../../components/dragelement":177,"../../components/fx":198,"../../lib/setcursor":319,"./constants":353,"./dragbox":355,"@plotly/d3":20}],357:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -73630,7 +76000,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
};
};
-},{"../../lib":287,"../../registry":378,"./axis_ids":338}],348:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./axis_ids":350}],358:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -74247,7 +76617,7 @@ exports.toSVG = function(gd) {
exports.updateFx = _dereq_('./graph_interact').updateFx;
-},{"../../components/drawing":179,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../registry":378,"../get_data":367,"../plots":371,"./attributes":332,"./axis_ids":338,"./constants":341,"./graph_interact":344,"./layout_attributes":349,"./layout_defaults":350,"./transition_axes":361,"@plotly/d3":20}],349:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../registry":387,"../get_data":376,"../plots":380,"./attributes":344,"./axis_ids":350,"./constants":353,"./graph_interact":356,"./layout_attributes":359,"./layout_defaults":360,"./transition_axes":370,"@plotly/d3":20}],359:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../font_attributes');
@@ -74595,7 +76965,9 @@ module.exports = {
editType: 'ticks',
},
automargin: {
- valType: 'boolean',
+ valType: 'flaglist',
+ flags: ['height', 'width', 'left', 'right', 'top', 'bottom'],
+ extras: [true, false],
dflt: false,
editType: 'ticks',
},
@@ -74879,7 +77251,7 @@ module.exports = {
}
};
-},{"../../components/color/attributes":156,"../../components/drawing/attributes":178,"../../constants/numerical":267,"../../lib/extend":281,"../../plot_api/plot_template":323,"../../plots/cartesian/axis_format_attributes":337,"../font_attributes":365,"./constants":341}],350:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../components/drawing/attributes":179,"../../constants/numerical":279,"../../lib/extend":293,"../../plot_api/plot_template":335,"../../plots/cartesian/axis_format_attributes":349,"../font_attributes":374,"./constants":353}],360:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -75028,6 +77400,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
axLayoutOut._traceIndices = traces.map(function(t) { return t._expandedIndex; });
axLayoutOut._annIndices = [];
axLayoutOut._shapeIndices = [];
+ axLayoutOut._selectionIndices = [];
axLayoutOut._imgIndices = [];
axLayoutOut._subplotsWith = [];
axLayoutOut._counterAxes = [];
@@ -75258,7 +77631,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
});
};
-},{"../../components/color":157,"../../components/fx/helpers":193,"../../components/fx/hovermode_defaults":196,"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378,"../layout_attributes":369,"./axis_defaults":336,"./axis_ids":338,"./constants":341,"./constraints":342,"./layout_attributes":349,"./position_defaults":352,"./type_defaults":362}],351:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx/helpers":194,"../../components/fx/hovermode_defaults":197,"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"../layout_attributes":378,"./axis_defaults":348,"./axis_ids":350,"./constants":353,"./constraints":354,"./layout_attributes":359,"./position_defaults":362,"./type_defaults":371}],361:[function(_dereq_,module,exports){
'use strict';
var colorMix = _dereq_('tinycolor2').mix;
@@ -75339,7 +77712,7 @@ module.exports = function handleLineGridDefaults(containerIn, containerOut, coer
}
};
-},{"../../components/color/attributes":156,"../../lib":287,"tinycolor2":121}],352:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib":299,"tinycolor2":122}],362:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -75418,7 +77791,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer
return containerOut;
};
-},{"../../lib":287,"fast-isnumeric":33}],353:[function(_dereq_,module,exports){
+},{"../../lib":299,"fast-isnumeric":33}],363:[function(_dereq_,module,exports){
'use strict';
var getShowAttrDflt = _dereq_('./show_dflt');
@@ -75436,7 +77809,7 @@ module.exports = function handlePrefixSuffixDefaults(containerIn, containerOut,
if(tickSuffix) coerce('showticksuffix', showAttrDflt);
};
-},{"./show_dflt":357}],354:[function(_dereq_,module,exports){
+},{"./show_dflt":366}],364:[function(_dereq_,module,exports){
'use strict';
var FROM_BL = _dereq_('../../constants/alignment').FROM_BL;
@@ -75456,941 +77829,7 @@ module.exports = function scaleZoom(ax, factor, centerFraction) {
ax.setScale();
};
-},{"../../constants/alignment":262}],355:[function(_dereq_,module,exports){
-'use strict';
-
-var polybool = _dereq_('polybooljs');
-
-var Registry = _dereq_('../../registry');
-var dashStyle = _dereq_('../../components/drawing').dashStyle;
-var Color = _dereq_('../../components/color');
-var Fx = _dereq_('../../components/fx');
-var makeEventData = _dereq_('../../components/fx/helpers').makeEventData;
-var dragHelpers = _dereq_('../../components/dragelement/helpers');
-var freeMode = dragHelpers.freeMode;
-var rectMode = dragHelpers.rectMode;
-var drawMode = dragHelpers.drawMode;
-var openMode = dragHelpers.openMode;
-var selectMode = dragHelpers.selectMode;
-
-var displayOutlines = _dereq_('../../components/shapes/draw_newshape/display_outlines');
-var handleEllipse = _dereq_('../../components/shapes/draw_newshape/helpers').handleEllipse;
-var newShapes = _dereq_('../../components/shapes/draw_newshape/newshapes');
-
-var Lib = _dereq_('../../lib');
-var polygon = _dereq_('../../lib/polygon');
-var throttle = _dereq_('../../lib/throttle');
-var getFromId = _dereq_('./axis_ids').getFromId;
-var clearGlCanvases = _dereq_('../../lib/clear_gl_canvases');
-
-var redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;
-
-var constants = _dereq_('./constants');
-var MINSELECT = constants.MINSELECT;
-
-var filteredPolygon = polygon.filter;
-var polygonTester = polygon.tester;
-
-var clearSelect = _dereq_('./handle_outline').clearSelect;
-
-var helpers = _dereq_('./helpers');
-var p2r = helpers.p2r;
-var axValue = helpers.axValue;
-var getTransform = helpers.getTransform;
-
-function prepSelect(e, startX, startY, dragOptions, mode) {
- var isFreeMode = freeMode(mode);
- var isRectMode = rectMode(mode);
- var isOpenMode = openMode(mode);
- var isDrawMode = drawMode(mode);
- var isSelectMode = selectMode(mode);
-
- var isLine = mode === 'drawline';
- var isEllipse = mode === 'drawcircle';
- var isLineOrEllipse = isLine || isEllipse; // cases with two start & end positions
-
- var gd = dragOptions.gd;
- var fullLayout = gd._fullLayout;
- var zoomLayer = fullLayout._zoomlayer;
- var dragBBox = dragOptions.element.getBoundingClientRect();
- var plotinfo = dragOptions.plotinfo;
- var transform = getTransform(plotinfo);
- var x0 = startX - dragBBox.left;
- var y0 = startY - dragBBox.top;
-
- fullLayout._calcInverseTransform(gd);
- var transformedCoords = Lib.apply3DTransform(fullLayout._invTransform)(x0, y0);
- x0 = transformedCoords[0];
- y0 = transformedCoords[1];
- var scaleX = fullLayout._invScaleX;
- var scaleY = fullLayout._invScaleY;
-
- var x1 = x0;
- var y1 = y0;
- var path0 = 'M' + x0 + ',' + y0;
- var pw = dragOptions.xaxes[0]._length;
- var ph = dragOptions.yaxes[0]._length;
- var allAxes = dragOptions.xaxes.concat(dragOptions.yaxes);
- var subtract = e.altKey &&
- !(drawMode(mode) && isOpenMode);
-
- var filterPoly, selectionTester, mergedPolygons, currentPolygon;
- var i, searchInfo, eventData;
-
- coerceSelectionsCache(e, gd, dragOptions);
-
- if(isFreeMode) {
- filterPoly = filteredPolygon([[x0, y0]], constants.BENDPX);
- }
-
- var outlines = zoomLayer.selectAll('path.select-outline-' + plotinfo.id).data(isDrawMode ? [0] : [1, 2]);
- var drwStyle = fullLayout.newshape;
-
- outlines.enter()
- .append('path')
- .attr('class', function(d) { return 'select-outline select-outline-' + d + ' select-outline-' + plotinfo.id; })
- .style(isDrawMode ? {
- opacity: drwStyle.opacity / 2,
- fill: isOpenMode ? undefined : drwStyle.fillcolor,
- stroke: drwStyle.line.color,
- 'stroke-dasharray': dashStyle(drwStyle.line.dash, drwStyle.line.width),
- 'stroke-width': drwStyle.line.width + 'px'
- } : {})
- .attr('fill-rule', drwStyle.fillrule)
- .classed('cursor-move', isDrawMode ? true : false)
- .attr('transform', transform)
- .attr('d', path0 + 'Z');
-
- var corners = zoomLayer.append('path')
- .attr('class', 'zoombox-corners')
- .style({
- fill: Color.background,
- stroke: Color.defaultLine,
- 'stroke-width': 1
- })
- .attr('transform', transform)
- .attr('d', 'M0,0Z');
-
-
- var throttleID = fullLayout._uid + constants.SELECTID;
- var selection = [];
-
- // find the traces to search for selection points
- var searchTraces = determineSearchTraces(gd, dragOptions.xaxes,
- dragOptions.yaxes, dragOptions.subplot);
-
- function ascending(a, b) { return a - b; }
-
- // allow subplots to override fillRangeItems routine
- var fillRangeItems;
-
- if(plotinfo.fillRangeItems) {
- fillRangeItems = plotinfo.fillRangeItems;
- } else {
- if(isRectMode) {
- fillRangeItems = function(eventData, poly) {
- var ranges = eventData.range = {};
-
- for(i = 0; i < allAxes.length; i++) {
- var ax = allAxes[i];
- var axLetter = ax._id.charAt(0);
-
- ranges[ax._id] = [
- p2r(ax, poly[axLetter + 'min']),
- p2r(ax, poly[axLetter + 'max'])
- ].sort(ascending);
- }
- };
- } else { // case of isFreeMode
- fillRangeItems = function(eventData, poly, filterPoly) {
- var dataPts = eventData.lassoPoints = {};
-
- for(i = 0; i < allAxes.length; i++) {
- var ax = allAxes[i];
- dataPts[ax._id] = filterPoly.filtered.map(axValue(ax));
- }
- };
- }
- }
-
- dragOptions.moveFn = function(dx0, dy0) {
- x1 = Math.max(0, Math.min(pw, scaleX * dx0 + x0));
- y1 = Math.max(0, Math.min(ph, scaleY * dy0 + y0));
-
- var dx = Math.abs(x1 - x0);
- var dy = Math.abs(y1 - y0);
-
- if(isRectMode) {
- var direction;
- var start, end;
-
- if(isSelectMode) {
- var q = fullLayout.selectdirection;
-
- if(q === 'any') {
- if(dy < Math.min(dx * 0.6, MINSELECT)) {
- direction = 'h';
- } else if(dx < Math.min(dy * 0.6, MINSELECT)) {
- direction = 'v';
- } else {
- direction = 'd';
- }
- } else {
- direction = q;
- }
-
- switch(direction) {
- case 'h':
- start = isEllipse ? ph / 2 : 0;
- end = ph;
- break;
- case 'v':
- start = isEllipse ? pw / 2 : 0;
- end = pw;
- break;
- }
- }
-
- if(isDrawMode) {
- switch(fullLayout.newshape.drawdirection) {
- case 'vertical':
- direction = 'h';
- start = isEllipse ? ph / 2 : 0;
- end = ph;
- break;
- case 'horizontal':
- direction = 'v';
- start = isEllipse ? pw / 2 : 0;
- end = pw;
- break;
- case 'ortho':
- if(dx < dy) {
- direction = 'h';
- start = y0;
- end = y1;
- } else {
- direction = 'v';
- start = x0;
- end = x1;
- }
- break;
- default: // i.e. case of 'diagonal'
- direction = 'd';
- }
- }
-
- if(direction === 'h') {
- // horizontal motion
- currentPolygon = isLineOrEllipse ?
- handleEllipse(isEllipse, [x1, start], [x1, end]) : // using x1 instead of x0 allows adjusting the line while drawing
- [[x0, start], [x0, end], [x1, end], [x1, start]]; // make a vertical box
-
- currentPolygon.xmin = isLineOrEllipse ? x1 : Math.min(x0, x1);
- currentPolygon.xmax = isLineOrEllipse ? x1 : Math.max(x0, x1);
- currentPolygon.ymin = Math.min(start, end);
- currentPolygon.ymax = Math.max(start, end);
- // extras to guide users in keeping a straight selection
- corners.attr('d', 'M' + currentPolygon.xmin + ',' + (y0 - MINSELECT) +
- 'h-4v' + (2 * MINSELECT) + 'h4Z' +
- 'M' + (currentPolygon.xmax - 1) + ',' + (y0 - MINSELECT) +
- 'h4v' + (2 * MINSELECT) + 'h-4Z');
- } else if(direction === 'v') {
- // vertical motion
- currentPolygon = isLineOrEllipse ?
- handleEllipse(isEllipse, [start, y1], [end, y1]) : // using y1 instead of y0 allows adjusting the line while drawing
- [[start, y0], [start, y1], [end, y1], [end, y0]]; // make a horizontal box
-
- currentPolygon.xmin = Math.min(start, end);
- currentPolygon.xmax = Math.max(start, end);
- currentPolygon.ymin = isLineOrEllipse ? y1 : Math.min(y0, y1);
- currentPolygon.ymax = isLineOrEllipse ? y1 : Math.max(y0, y1);
- corners.attr('d', 'M' + (x0 - MINSELECT) + ',' + currentPolygon.ymin +
- 'v-4h' + (2 * MINSELECT) + 'v4Z' +
- 'M' + (x0 - MINSELECT) + ',' + (currentPolygon.ymax - 1) +
- 'v4h' + (2 * MINSELECT) + 'v-4Z');
- } else if(direction === 'd') {
- // diagonal motion
- currentPolygon = isLineOrEllipse ?
- handleEllipse(isEllipse, [x0, y0], [x1, y1]) :
- [[x0, y0], [x0, y1], [x1, y1], [x1, y0]];
-
- currentPolygon.xmin = Math.min(x0, x1);
- currentPolygon.xmax = Math.max(x0, x1);
- currentPolygon.ymin = Math.min(y0, y1);
- currentPolygon.ymax = Math.max(y0, y1);
- corners.attr('d', 'M0,0Z');
- }
- } else if(isFreeMode) {
- filterPoly.addPt([x1, y1]);
- currentPolygon = filterPoly.filtered;
- }
-
- // create outline & tester
- if(dragOptions.selectionDefs && dragOptions.selectionDefs.length) {
- mergedPolygons = mergePolygons(dragOptions.mergedPolygons, currentPolygon, subtract);
- currentPolygon.subtract = subtract;
- selectionTester = multiTester(dragOptions.selectionDefs.concat([currentPolygon]));
- } else {
- mergedPolygons = [currentPolygon];
- selectionTester = polygonTester(currentPolygon);
- }
-
- // display polygons on the screen
- displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
-
- if(isSelectMode) {
- throttle.throttle(
- throttleID,
- constants.SELECTDELAY,
- function() {
- selection = [];
-
- var thisSelection;
- var traceSelections = [];
- var traceSelection;
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
-
- traceSelection = searchInfo._module.selectPoints(searchInfo, selectionTester);
- traceSelections.push(traceSelection);
-
- thisSelection = fillSelectionItem(traceSelection, searchInfo);
-
- if(selection.length) {
- for(var j = 0; j < thisSelection.length; j++) {
- selection.push(thisSelection[j]);
- }
- } else selection = thisSelection;
- }
-
- eventData = {points: selection};
- updateSelectedState(gd, searchTraces, eventData);
- fillRangeItems(eventData, currentPolygon, filterPoly);
- dragOptions.gd.emit('plotly_selecting', eventData);
- }
- );
- }
- };
-
- dragOptions.clickFn = function(numClicks, evt) {
- corners.remove();
-
- if(gd._fullLayout._activeShapeIndex >= 0) {
- gd._fullLayout._deactivateShape(gd);
- return;
- }
- if(isDrawMode) return;
-
- var clickmode = fullLayout.clickmode;
-
- throttle.done(throttleID).then(function() {
- throttle.clear(throttleID);
- if(numClicks === 2) {
- // clear selection on doubleclick
- outlines.remove();
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- searchInfo._module.selectPoints(searchInfo, false);
- }
-
- updateSelectedState(gd, searchTraces);
-
- clearSelectionsCache(dragOptions);
-
- gd.emit('plotly_deselect', null);
- } else {
- if(clickmode.indexOf('select') > -1) {
- selectOnClick(evt, gd, dragOptions.xaxes, dragOptions.yaxes,
- dragOptions.subplot, dragOptions, outlines);
- }
-
- if(clickmode === 'event') {
- // TODO: remove in v3 - this was probably never intended to work as it does,
- // but in case anyone depends on it we don't want to break it now.
- // Note that click-to-select introduced pre v3 also emitts proper
- // event data when clickmode is having 'select' in its flag list.
- gd.emit('plotly_selected', undefined);
- }
- }
-
- Fx.click(gd, evt);
- }).catch(Lib.error);
- };
-
- dragOptions.doneFn = function() {
- corners.remove();
-
- throttle.done(throttleID).then(function() {
- throttle.clear(throttleID);
- dragOptions.gd.emit('plotly_selected', eventData);
-
- if(currentPolygon && dragOptions.selectionDefs) {
- // save last polygons
- currentPolygon.subtract = subtract;
- dragOptions.selectionDefs.push(currentPolygon);
-
- // we have to keep reference to arrays container
- dragOptions.mergedPolygons.length = 0;
- [].push.apply(dragOptions.mergedPolygons, mergedPolygons);
- }
-
- if(dragOptions.doneFnCompleted) {
- dragOptions.doneFnCompleted(selection);
- }
- }).catch(Lib.error);
-
- if(isDrawMode) {
- clearSelectionsCache(dragOptions);
- }
- };
-}
-
-function selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutlines) {
- var hoverData = gd._hoverdata;
- var fullLayout = gd._fullLayout;
- var clickmode = fullLayout.clickmode;
- var sendEvents = clickmode.indexOf('event') > -1;
- var selection = [];
- var searchTraces, searchInfo, currentSelectionDef, selectionTester, traceSelection;
- var thisTracesSelection, pointOrBinSelected, subtract, eventData, i;
-
- if(isHoverDataSet(hoverData)) {
- coerceSelectionsCache(evt, gd, dragOptions);
- searchTraces = determineSearchTraces(gd, xAxes, yAxes, subplot);
- var clickedPtInfo = extractClickedPtInfo(hoverData, searchTraces);
- var isBinnedTrace = clickedPtInfo.pointNumbers.length > 0;
-
-
- // Note: potentially costly operation isPointOrBinSelected is
- // called as late as possible through the use of an assignment
- // in an if condition.
- if(isBinnedTrace ?
- isOnlyThisBinSelected(searchTraces, clickedPtInfo) :
- isOnlyOnePointSelected(searchTraces) &&
- (pointOrBinSelected = isPointOrBinSelected(clickedPtInfo))) {
- if(polygonOutlines) polygonOutlines.remove();
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- searchInfo._module.selectPoints(searchInfo, false);
- }
-
- updateSelectedState(gd, searchTraces);
-
- clearSelectionsCache(dragOptions);
-
- if(sendEvents) {
- gd.emit('plotly_deselect', null);
- }
- } else {
- subtract = evt.shiftKey &&
- (pointOrBinSelected !== undefined ?
- pointOrBinSelected :
- isPointOrBinSelected(clickedPtInfo));
- currentSelectionDef = newPointSelectionDef(clickedPtInfo.pointNumber, clickedPtInfo.searchInfo, subtract);
-
- var allSelectionDefs = dragOptions.selectionDefs.concat([currentSelectionDef]);
- selectionTester = multiTester(allSelectionDefs);
-
- for(i = 0; i < searchTraces.length; i++) {
- traceSelection = searchTraces[i]._module.selectPoints(searchTraces[i], selectionTester);
- thisTracesSelection = fillSelectionItem(traceSelection, searchTraces[i]);
-
- if(selection.length) {
- for(var j = 0; j < thisTracesSelection.length; j++) {
- selection.push(thisTracesSelection[j]);
- }
- } else selection = thisTracesSelection;
- }
-
- eventData = {points: selection};
- updateSelectedState(gd, searchTraces, eventData);
-
- if(currentSelectionDef && dragOptions) {
- dragOptions.selectionDefs.push(currentSelectionDef);
- }
-
- if(polygonOutlines) {
- var polygons = dragOptions.mergedPolygons;
- var isOpenMode = openMode(dragOptions.dragmode);
-
- // display polygons on the screen
- displayOutlines(convertPoly(polygons, isOpenMode), polygonOutlines, dragOptions);
- }
-
- if(sendEvents) {
- gd.emit('plotly_selected', eventData);
- }
- }
- }
-}
-
-/**
- * Constructs a new point selection definition object.
- */
-function newPointSelectionDef(pointNumber, searchInfo, subtract) {
- return {
- pointNumber: pointNumber,
- searchInfo: searchInfo,
- subtract: subtract
- };
-}
-
-function isPointSelectionDef(o) {
- return 'pointNumber' in o && 'searchInfo' in o;
-}
-
-/*
- * Constructs a new point number tester.
- */
-function newPointNumTester(pointSelectionDef) {
- return {
- xmin: 0,
- xmax: 0,
- ymin: 0,
- ymax: 0,
- pts: [],
- contains: function(pt, omitFirstEdge, pointNumber, searchInfo) {
- var idxWantedTrace = pointSelectionDef.searchInfo.cd[0].trace._expandedIndex;
- var idxActualTrace = searchInfo.cd[0].trace._expandedIndex;
- return idxActualTrace === idxWantedTrace &&
- pointNumber === pointSelectionDef.pointNumber;
- },
- isRect: false,
- degenerate: false,
- subtract: pointSelectionDef.subtract
- };
-}
-
-/**
- * Wraps multiple selection testers.
- *
- * @param {Array} list - An array of selection testers.
- *
- * @return a selection tester object with a contains function
- * that can be called to evaluate a point against all wrapped
- * selection testers that were passed in list.
- */
-function multiTester(list) {
- var testers = [];
- var xmin = isPointSelectionDef(list[0]) ? 0 : list[0][0][0];
- var xmax = xmin;
- var ymin = isPointSelectionDef(list[0]) ? 0 : list[0][0][1];
- var ymax = ymin;
-
- for(var i = 0; i < list.length; i++) {
- if(isPointSelectionDef(list[i])) {
- testers.push(newPointNumTester(list[i]));
- } else {
- var tester = polygon.tester(list[i]);
- tester.subtract = list[i].subtract;
- testers.push(tester);
- xmin = Math.min(xmin, tester.xmin);
- xmax = Math.max(xmax, tester.xmax);
- ymin = Math.min(ymin, tester.ymin);
- ymax = Math.max(ymax, tester.ymax);
- }
- }
-
- /**
- * Tests if the given point is within this tester.
- *
- * @param {Array} pt - [0] is the x coordinate, [1] is the y coordinate of the point.
- * @param {*} arg - An optional parameter to pass down to wrapped testers.
- * @param {number} pointNumber - The point number of the point within the underlying data array.
- * @param {number} searchInfo - An object identifying the trace the point is contained in.
- *
- * @return {boolean} true if point is considered to be selected, false otherwise.
- */
- function contains(pt, arg, pointNumber, searchInfo) {
- var contained = false;
- for(var i = 0; i < testers.length; i++) {
- if(testers[i].contains(pt, arg, pointNumber, searchInfo)) {
- // if contained by subtract tester - exclude the point
- contained = testers[i].subtract === false;
- }
- }
-
- return contained;
- }
-
- return {
- xmin: xmin,
- xmax: xmax,
- ymin: ymin,
- ymax: ymax,
- pts: [],
- contains: contains,
- isRect: false,
- degenerate: false
- };
-}
-
-function coerceSelectionsCache(evt, gd, dragOptions) {
- gd._fullLayout._drawing = false;
-
- var fullLayout = gd._fullLayout;
- var plotinfo = dragOptions.plotinfo;
- var dragmode = dragOptions.dragmode;
-
- var selectingOnSameSubplot = (
- fullLayout._lastSelectedSubplot &&
- fullLayout._lastSelectedSubplot === plotinfo.id
- );
-
- var hasModifierKey = (evt.shiftKey || evt.altKey) &&
- !(drawMode(dragmode) && openMode(dragmode));
-
- if(selectingOnSameSubplot && hasModifierKey &&
- (plotinfo.selection && plotinfo.selection.selectionDefs) && !dragOptions.selectionDefs) {
- // take over selection definitions from prev mode, if any
- dragOptions.selectionDefs = plotinfo.selection.selectionDefs;
- dragOptions.mergedPolygons = plotinfo.selection.mergedPolygons;
- } else if(!hasModifierKey || !plotinfo.selection) {
- clearSelectionsCache(dragOptions);
- }
-
- // clear selection outline when selecting a different subplot
- if(!selectingOnSameSubplot) {
- clearSelect(gd);
- fullLayout._lastSelectedSubplot = plotinfo.id;
- }
-}
-
-function clearSelectionsCache(dragOptions) {
- var dragmode = dragOptions.dragmode;
- var plotinfo = dragOptions.plotinfo;
-
- var gd = dragOptions.gd;
- if(gd._fullLayout._activeShapeIndex >= 0) {
- gd._fullLayout._deactivateShape(gd);
- }
-
- if(drawMode(dragmode)) {
- var fullLayout = gd._fullLayout;
- var zoomLayer = fullLayout._zoomlayer;
-
- var outlines = zoomLayer.selectAll('.select-outline-' + plotinfo.id);
- if(outlines && gd._fullLayout._drawing) {
- // add shape
- var shapes = newShapes(outlines, dragOptions);
- if(shapes) {
- Registry.call('_guiRelayout', gd, {
- shapes: shapes
- });
- }
-
- gd._fullLayout._drawing = false;
- }
- }
-
- plotinfo.selection = {};
- plotinfo.selection.selectionDefs = dragOptions.selectionDefs = [];
- plotinfo.selection.mergedPolygons = dragOptions.mergedPolygons = [];
-}
-
-function determineSearchTraces(gd, xAxes, yAxes, subplot) {
- var searchTraces = [];
- var xAxisIds = xAxes.map(function(ax) { return ax._id; });
- var yAxisIds = yAxes.map(function(ax) { return ax._id; });
- var cd, trace, i;
-
- for(i = 0; i < gd.calcdata.length; i++) {
- cd = gd.calcdata[i];
- trace = cd[0].trace;
-
- if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
-
- if(subplot && (trace.subplot === subplot || trace.geo === subplot)) {
- searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
- } else if(
- trace.type === 'splom' &&
- // FIXME: make sure we don't have more than single axis for splom
- trace._xaxes[xAxisIds[0]] && trace._yaxes[yAxisIds[0]]
- ) {
- var info = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
- info.scene = gd._fullLayout._splomScenes[trace.uid];
- searchTraces.push(info);
- } else if(
- trace.type === 'sankey'
- ) {
- var sankeyInfo = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
- searchTraces.push(sankeyInfo);
- } else {
- if(xAxisIds.indexOf(trace.xaxis) === -1) continue;
- if(yAxisIds.indexOf(trace.yaxis) === -1) continue;
-
- searchTraces.push(createSearchInfo(trace._module, cd,
- getFromId(gd, trace.xaxis), getFromId(gd, trace.yaxis)));
- }
- }
-
- return searchTraces;
-
- function createSearchInfo(module, calcData, xaxis, yaxis) {
- return {
- _module: module,
- cd: calcData,
- xaxis: xaxis,
- yaxis: yaxis
- };
- }
-}
-
-function isHoverDataSet(hoverData) {
- return hoverData &&
- Array.isArray(hoverData) &&
- hoverData[0].hoverOnBox !== true;
-}
-
-function extractClickedPtInfo(hoverData, searchTraces) {
- var hoverDatum = hoverData[0];
- var pointNumber = -1;
- var pointNumbers = [];
- var searchInfo, i;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- if(hoverDatum.fullData._expandedIndex === searchInfo.cd[0].trace._expandedIndex) {
- // Special case for box (and violin)
- if(hoverDatum.hoverOnBox === true) {
- break;
- }
-
- // Hint: in some traces like histogram, one graphical element
- // doesn't correspond to one particular data point, but to
- // bins of data points. Thus, hoverDatum can have a binNumber
- // property instead of pointNumber.
- if(hoverDatum.pointNumber !== undefined) {
- pointNumber = hoverDatum.pointNumber;
- } else if(hoverDatum.binNumber !== undefined) {
- pointNumber = hoverDatum.binNumber;
- pointNumbers = hoverDatum.pointNumbers;
- }
-
- break;
- }
- }
-
- return {
- pointNumber: pointNumber,
- pointNumbers: pointNumbers,
- searchInfo: searchInfo
- };
-}
-
-function isPointOrBinSelected(clickedPtInfo) {
- var trace = clickedPtInfo.searchInfo.cd[0].trace;
- var ptNum = clickedPtInfo.pointNumber;
- var ptNums = clickedPtInfo.pointNumbers;
- var ptNumsSet = ptNums.length > 0;
-
- // When pointsNumbers is set (e.g. histogram's binning),
- // it is assumed that when the first point of
- // a bin is selected, all others are as well
- var ptNumToTest = ptNumsSet ? ptNums[0] : ptNum;
-
- // TODO potential performance improvement
- // Primarily we need this function to determine if a click adds
- // or subtracts from a selection.
- // In cases `trace.selectedpoints` is a huge array, indexOf
- // might be slow. One remedy would be to introduce a hash somewhere.
- return trace.selectedpoints ? trace.selectedpoints.indexOf(ptNumToTest) > -1 : false;
-}
-
-function isOnlyThisBinSelected(searchTraces, clickedPtInfo) {
- var tracesWithSelectedPts = [];
- var searchInfo, trace, isSameTrace, i;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- if(searchInfo.cd[0].trace.selectedpoints && searchInfo.cd[0].trace.selectedpoints.length > 0) {
- tracesWithSelectedPts.push(searchInfo);
- }
- }
-
- if(tracesWithSelectedPts.length === 1) {
- isSameTrace = tracesWithSelectedPts[0] === clickedPtInfo.searchInfo;
- if(isSameTrace) {
- trace = clickedPtInfo.searchInfo.cd[0].trace;
- if(trace.selectedpoints.length === clickedPtInfo.pointNumbers.length) {
- for(i = 0; i < clickedPtInfo.pointNumbers.length; i++) {
- if(trace.selectedpoints.indexOf(clickedPtInfo.pointNumbers[i]) < 0) {
- return false;
- }
- }
- return true;
- }
- }
- }
-
- return false;
-}
-
-function isOnlyOnePointSelected(searchTraces) {
- var len = 0;
- var searchInfo, trace, i;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- trace = searchInfo.cd[0].trace;
- if(trace.selectedpoints) {
- if(trace.selectedpoints.length > 1) return false;
-
- len += trace.selectedpoints.length;
- if(len > 1) return false;
- }
- }
-
- return len === 1;
-}
-
-function updateSelectedState(gd, searchTraces, eventData) {
- var i, searchInfo, cd, trace;
-
- // before anything else, update preGUI if necessary
- for(i = 0; i < searchTraces.length; i++) {
- var fullInputTrace = searchTraces[i].cd[0].trace._fullInput;
- var tracePreGUI = gd._fullLayout._tracePreGUI[fullInputTrace.uid] || {};
- if(tracePreGUI.selectedpoints === undefined) {
- tracePreGUI.selectedpoints = fullInputTrace._input.selectedpoints || null;
- }
- }
-
- if(eventData) {
- var pts = eventData.points || [];
-
- for(i = 0; i < searchTraces.length; i++) {
- trace = searchTraces[i].cd[0].trace;
- trace._input.selectedpoints = trace._fullInput.selectedpoints = [];
- if(trace._fullInput !== trace) trace.selectedpoints = [];
- }
-
- for(i = 0; i < pts.length; i++) {
- var pt = pts[i];
- var data = pt.data;
- var fullData = pt.fullData;
-
- if(pt.pointIndices) {
- [].push.apply(data.selectedpoints, pt.pointIndices);
- if(trace._fullInput !== trace) {
- [].push.apply(fullData.selectedpoints, pt.pointIndices);
- }
- } else {
- data.selectedpoints.push(pt.pointIndex);
- if(trace._fullInput !== trace) {
- fullData.selectedpoints.push(pt.pointIndex);
- }
- }
- }
- } else {
- for(i = 0; i < searchTraces.length; i++) {
- trace = searchTraces[i].cd[0].trace;
- delete trace.selectedpoints;
- delete trace._input.selectedpoints;
- if(trace._fullInput !== trace) {
- delete trace._fullInput.selectedpoints;
- }
- }
- }
-
- var hasRegl = false;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- cd = searchInfo.cd;
- trace = cd[0].trace;
-
- if(Registry.traceIs(trace, 'regl')) {
- hasRegl = true;
- }
-
- var _module = searchInfo._module;
- var fn = _module.styleOnSelect || _module.style;
- if(fn) {
- fn(gd, cd, cd[0].node3);
- if(cd[0].nodeRangePlot3) fn(gd, cd, cd[0].nodeRangePlot3);
- }
- }
-
- if(hasRegl) {
- clearGlCanvases(gd);
- redrawReglTraces(gd);
- }
-}
-
-function mergePolygons(list, poly, subtract) {
- var res;
-
- if(subtract) {
- res = polybool.difference({
- regions: list,
- inverted: false
- }, {
- regions: [poly],
- inverted: false
- });
-
- return res.regions;
- }
-
- res = polybool.union({
- regions: list,
- inverted: false
- }, {
- regions: [poly],
- inverted: false
- });
-
- return res.regions;
-}
-
-function fillSelectionItem(selection, searchInfo) {
- if(Array.isArray(selection)) {
- var cd = searchInfo.cd;
- var trace = searchInfo.cd[0].trace;
-
- for(var i = 0; i < selection.length; i++) {
- selection[i] = makeEventData(selection[i], trace, cd);
- }
- }
-
- return selection;
-}
-
-function convertPoly(polygonsIn, isOpenMode) { // add M and L command to draft positions
- var polygonsOut = [];
- for(var i = 0; i < polygonsIn.length; i++) {
- polygonsOut[i] = [];
- for(var j = 0; j < polygonsIn[i].length; j++) {
- polygonsOut[i][j] = [];
- polygonsOut[i][j][0] = j ? 'L' : 'M';
- for(var k = 0; k < polygonsIn[i][j].length; k++) {
- polygonsOut[i][j].push(
- polygonsIn[i][j][k]
- );
- }
- }
-
- if(!isOpenMode) {
- polygonsOut[i].push([
- 'Z',
- polygonsOut[i][0][1], // initial x
- polygonsOut[i][0][2] // initial y
- ]);
- }
- }
-
- return polygonsOut;
-}
-
-module.exports = {
- prepSelect: prepSelect,
- clearSelect: clearSelect,
- clearSelectionsCache: clearSelectionsCache,
- selectOnClick: selectOnClick
-};
-
-},{"../../components/color":157,"../../components/dragelement/helpers":175,"../../components/drawing":179,"../../components/fx":197,"../../components/fx/helpers":193,"../../components/shapes/draw_newshape/display_outlines":245,"../../components/shapes/draw_newshape/helpers":246,"../../components/shapes/draw_newshape/newshapes":247,"../../lib":287,"../../lib/clear_gl_canvases":275,"../../lib/polygon":299,"../../lib/throttle":311,"../../plot_api/subroutines":324,"../../registry":378,"./axis_ids":338,"./constants":341,"./handle_outline":345,"./helpers":346,"polybooljs":75}],356:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274}],365:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -77355,7 +78794,7 @@ module.exports = function setConvert(ax, fullLayout) {
delete ax._forceTick0;
};
-},{"../../constants/numerical":267,"../../lib":287,"./axis_ids":338,"./constants":341,"@plotly/d3":20,"d3-time-format":30,"fast-isnumeric":33}],357:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"./axis_ids":350,"./constants":353,"@plotly/d3":20,"d3-time-format":30,"fast-isnumeric":33}],366:[function(_dereq_,module,exports){
'use strict';
/*
@@ -77386,7 +78825,7 @@ module.exports = function getShowAttrDflt(containerIn) {
}
};
-},{}],358:[function(_dereq_,module,exports){
+},{}],367:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -77461,7 +78900,7 @@ function tickformatstopDefaults(valueIn, valueOut) {
}
}
-},{"../../components/color":157,"../../lib":287,"../array_container_defaults":329,"./layout_attributes":349,"./show_dflt":357}],359:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../array_container_defaults":341,"./layout_attributes":359,"./show_dflt":366}],368:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -77493,7 +78932,7 @@ module.exports = function handleTickMarkDefaults(containerIn, containerOut, coer
}
};
-},{"../../lib":287,"./layout_attributes":349}],360:[function(_dereq_,module,exports){
+},{"../../lib":299,"./layout_attributes":359}],369:[function(_dereq_,module,exports){
'use strict';
var cleanTicks = _dereq_('./clean_ticks');
@@ -77539,7 +78978,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe
}
};
-},{"../../lib":287,"./clean_ticks":340}],361:[function(_dereq_,module,exports){
+},{"../../lib":299,"./clean_ticks":352}],370:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -77744,7 +79183,7 @@ module.exports = function transitionAxes(gd, edits, transitionOpts, makeOnComple
return Promise.resolve();
};
-},{"../../components/drawing":179,"../../lib":287,"../../registry":378,"./axes":334,"@plotly/d3":20}],362:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"../../registry":387,"./axes":346,"@plotly/d3":20}],371:[function(_dereq_,module,exports){
'use strict';
var traceIs = _dereq_('../../registry').traceIs;
@@ -77876,7 +79315,7 @@ function isBoxWithoutPositionCoords(trace, axLetter) {
);
}
-},{"../../registry":378,"./axis_autotype":335}],363:[function(_dereq_,module,exports){
+},{"../../registry":387,"./axis_autotype":347}],372:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -78295,7 +79734,7 @@ function crawl(attrs, callback, path, depth) {
});
}
-},{"../lib":287,"../registry":378}],364:[function(_dereq_,module,exports){
+},{"../lib":299,"../registry":387}],373:[function(_dereq_,module,exports){
'use strict';
var extendFlat = _dereq_('../lib/extend').extendFlat;
@@ -78392,7 +79831,7 @@ exports.defaults = function(containerOut, layout, coerce, dfltDomains) {
if(!(y[0] < y[1])) containerOut.domain.y = dfltY.slice();
};
-},{"../lib/extend":281}],365:[function(_dereq_,module,exports){
+},{"../lib/extend":293}],374:[function(_dereq_,module,exports){
'use strict';
/*
@@ -78447,7 +79886,7 @@ module.exports = function(opts) {
return attrs;
};
-},{}],366:[function(_dereq_,module,exports){
+},{}],375:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -78473,7 +79912,7 @@ module.exports = {
}
};
-},{}],367:[function(_dereq_,module,exports){
+},{}],376:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -78594,7 +80033,7 @@ exports.getSubplotData = function getSubplotData(data, type, subplotId) {
return subplotData;
};
-},{"../registry":378,"./cartesian/constants":341}],368:[function(_dereq_,module,exports){
+},{"../registry":387,"./cartesian/constants":353}],377:[function(_dereq_,module,exports){
'use strict';
function xformMatrix(m, v) {
@@ -78619,13 +80058,14 @@ function project(camera, v) {
module.exports = project;
-},{}],369:[function(_dereq_,module,exports){
+},{}],378:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('./font_attributes');
var animationAttrs = _dereq_('./animation_attributes');
var colorAttrs = _dereq_('../components/color/attributes');
var drawNewShapeAttrs = _dereq_('../components/shapes/draw_newshape/attributes');
+var drawNewSelectionAttrs = _dereq_('../components/selections/draw_newselection/attributes');
var padAttrs = _dereq_('./pad_attributes');
var extendFlat = _dereq_('../lib/extend').extendFlat;
@@ -78827,6 +80267,9 @@ module.exports = {
newshape: drawNewShapeAttrs.newshape,
activeshape: drawNewShapeAttrs.activeshape,
+ newselection: drawNewSelectionAttrs.newselection,
+ activeselection: drawNewSelectionAttrs.activeselection,
+
meta: {
valType: 'any',
arrayOk: true,
@@ -78847,7 +80290,7 @@ module.exports = {
}
};
-},{"../components/color/attributes":156,"../components/shapes/draw_newshape/attributes":242,"../lib/extend":281,"./animation_attributes":328,"./font_attributes":365,"./pad_attributes":370}],370:[function(_dereq_,module,exports){
+},{"../components/color/attributes":157,"../components/selections/draw_newselection/attributes":242,"../components/shapes/draw_newshape/attributes":254,"../lib/extend":293,"./animation_attributes":340,"./font_attributes":374,"./pad_attributes":379}],379:[function(_dereq_,module,exports){
'use strict';
/**
@@ -78886,7 +80329,7 @@ module.exports = function(opts) {
};
};
-},{}],371:[function(_dereq_,module,exports){
+},{}],380:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -78902,7 +80345,7 @@ var Color = _dereq_('../components/color');
var BADNUM = _dereq_('../constants/numerical').BADNUM;
var axisIDs = _dereq_('./cartesian/axis_ids');
-var clearSelect = _dereq_('./cartesian/handle_outline').clearSelect;
+var clearOutline = _dereq_('../components/shapes/handle_outline').clearOutline;
var animationAttrs = _dereq_('./animation_attributes');
var frameAttrs = _dereq_('./frame_attributes');
@@ -79370,7 +80813,7 @@ plots.supplyDefaults = function(gd, opts) {
// we should try to come up with a better solution when implementing
// https://github.com/plotly/plotly.js/issues/1851
if(oldFullLayout._zoomlayer && !gd._dragging) {
- clearSelect({ // mock old gd
+ clearOutline({ // mock old gd
_fullLayout: oldFullLayout
});
}
@@ -80428,6 +81871,11 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {
'supplyDrawNewShapeDefaults'
)(layoutIn, layoutOut, coerce);
+ Registry.getComponentMethod(
+ 'selections',
+ 'supplyDrawNewSelectionDefaults'
+ )(layoutIn, layoutOut, coerce);
+
coerce('meta');
// do not include defaults in fullLayout when users do not set transition
@@ -81790,6 +83238,7 @@ function _transition(gd, transitionOpts, opts) {
interruptPreviousTransitions,
opts.prepareFn,
plots.rehover,
+ plots.reselect,
executeTransitions
];
@@ -82246,6 +83695,10 @@ plots.redrag = function(gd) {
}
};
+plots.reselect = function(gd) {
+ Registry.getComponentMethod('selections', 'reselect')(gd);
+};
+
plots.generalUpdatePerTraceModule = function(gd, subplot, subplotCalcData, subplotLayout) {
var traceHashOld = subplot.traceHash;
var traceHash = {};
@@ -82304,7 +83757,7 @@ plots.cleanBasePlot = function(desiredType, newFullData, newFullLayout, oldFullD
}
};
-},{"../components/color":157,"../constants/numerical":267,"../lib":287,"../plot_api/plot_schema":322,"../plot_api/plot_template":323,"../plots/get_data":367,"../registry":378,"./animation_attributes":328,"./attributes":330,"./cartesian/axis_ids":338,"./cartesian/handle_outline":345,"./command":363,"./font_attributes":365,"./frame_attributes":366,"./layout_attributes":369,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],372:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/shapes/handle_outline":259,"../constants/numerical":279,"../lib":299,"../plot_api/plot_schema":334,"../plot_api/plot_template":335,"../plots/get_data":376,"../registry":387,"./animation_attributes":340,"./attributes":342,"./cartesian/axis_ids":350,"./command":372,"./font_attributes":374,"./frame_attributes":375,"./layout_attributes":378,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],381:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -82376,7 +83829,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o
}
};
-},{"../lib":287,"../plot_api/plot_template":323,"./domain":364}],373:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_template":335,"./domain":373}],382:[function(_dereq_,module,exports){
'use strict';
var docs = _dereq_('../constants/docs');
@@ -82457,7 +83910,7 @@ exports.texttemplateAttrs = function(opts, extra) {
return texttemplate;
};
-},{"../constants/docs":264}],374:[function(_dereq_,module,exports){
+},{"../constants/docs":276}],383:[function(_dereq_,module,exports){
'use strict';
var Ternary = _dereq_('./ternary');
@@ -82530,7 +83983,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)
}
};
-},{"../../lib":287,"../../plots/get_data":367,"./layout_attributes":375,"./layout_defaults":376,"./ternary":377}],375:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/get_data":376,"./layout_attributes":384,"./layout_defaults":385,"./ternary":386}],384:[function(_dereq_,module,exports){
'use strict';
var colorAttrs = _dereq_('../../components/color/attributes');
@@ -82622,7 +84075,7 @@ attrs.aaxis.uirevision = attrs.baxis.uirevision = attrs.caxis.uirevision = {
editType: 'none',
};
-},{"../../components/color/attributes":156,"../../lib/extend":281,"../../plot_api/edit_types":316,"../cartesian/layout_attributes":349,"../domain":364}],376:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plot_api/edit_types":328,"../cartesian/layout_attributes":359,"../domain":373}],385:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -82748,7 +84201,7 @@ function handleAxisDefaults(containerIn, containerOut, options, ternaryLayoutOut
coerce('layer');
}
-},{"../../components/color":157,"../../lib":287,"../../plot_api/plot_template":323,"../cartesian/line_grid_defaults":351,"../cartesian/prefix_suffix_defaults":353,"../cartesian/tick_label_defaults":358,"../cartesian/tick_mark_defaults":359,"../cartesian/tick_value_defaults":360,"../subplot_defaults":372,"./layout_attributes":375}],377:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../plot_api/plot_template":335,"../cartesian/line_grid_defaults":361,"../cartesian/prefix_suffix_defaults":363,"../cartesian/tick_label_defaults":367,"../cartesian/tick_mark_defaults":368,"../cartesian/tick_value_defaults":369,"../subplot_defaults":381,"./layout_attributes":384}],386:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -82770,10 +84223,10 @@ var dragHelpers = _dereq_('../../components/dragelement/helpers');
var freeMode = dragHelpers.freeMode;
var rectMode = dragHelpers.rectMode;
var Titles = _dereq_('../../components/titles');
-var prepSelect = _dereq_('../cartesian/select').prepSelect;
-var selectOnClick = _dereq_('../cartesian/select').selectOnClick;
-var clearSelect = _dereq_('../cartesian/select').clearSelect;
-var clearSelectionsCache = _dereq_('../cartesian/select').clearSelectionsCache;
+var prepSelect = _dereq_('../../components/selections').prepSelect;
+var selectOnClick = _dereq_('../../components/selections').selectOnClick;
+var clearOutline = _dereq_('../../components/selections').clearOutline;
+var clearSelectionsCache = _dereq_('../../components/selections').clearSelectionsCache;
var constants = _dereq_('../cartesian/constants');
function Ternary(options, fullLayout) {
@@ -83235,9 +84688,9 @@ var STARTMARKER = 'm0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z';
// I guess this could be shared with cartesian... but for now it's separate.
var SHOWZOOMOUTTIP = true;
-proto.clearSelect = function() {
+proto.clearOutline = function() {
clearSelectionsCache(this.dragOptions);
- clearSelect(this.dragOptions.gd);
+ clearOutline(this.dragOptions.gd);
};
proto.initInteractions = function() {
@@ -83283,7 +84736,7 @@ proto.initInteractions = function() {
_this.dragOptions.clickFn = clickZoomPan;
_this.dragOptions.doneFn = dragDone;
panPrep();
- _this.clearSelect(gd);
+ _this.clearOutline(gd);
} else if(rectMode(dragModeNow) || freeMode(dragModeNow)) {
prepSelect(e, startX, startY, _this.dragOptions, dragModeNow);
}
@@ -83361,7 +84814,7 @@ proto.initInteractions = function() {
})
.attr('d', 'M0,0Z');
- _this.clearSelect(gd);
+ _this.clearOutline(gd);
}
function getAFrac(x, y) { return 1 - (y / _this.h); }
@@ -83520,7 +84973,7 @@ function removeZoombox(gd) {
.remove();
}
-},{"../../components/color":157,"../../components/dragelement":176,"../../components/dragelement/helpers":175,"../../components/drawing":179,"../../components/fx":197,"../../components/titles":255,"../../lib":287,"../../lib/extend":281,"../../registry":378,"../cartesian/axes":334,"../cartesian/constants":341,"../cartesian/select":355,"../cartesian/set_convert":356,"../plots":371,"@plotly/d3":20,"tinycolor2":121}],378:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/dragelement":177,"../../components/dragelement/helpers":176,"../../components/drawing":180,"../../components/fx":198,"../../components/selections":246,"../../components/titles":267,"../../lib":299,"../../lib/extend":293,"../../registry":387,"../cartesian/axes":346,"../cartesian/constants":353,"../cartesian/set_convert":365,"../plots":380,"@plotly/d3":20,"tinycolor2":122}],387:[function(_dereq_,module,exports){
'use strict';
var Loggers = _dereq_('./lib/loggers');
@@ -83978,7 +85431,7 @@ function getTraceType(traceType) {
return traceType;
}
-},{"./lib/dom":279,"./lib/extend":281,"./lib/is_plain_object":288,"./lib/loggers":291,"./lib/noop":296,"./lib/push_unique":301,"./plots/attributes":330,"./plots/layout_attributes":369}],379:[function(_dereq_,module,exports){
+},{"./lib/dom":291,"./lib/extend":293,"./lib/is_plain_object":300,"./lib/loggers":303,"./lib/noop":308,"./lib/push_unique":313,"./plots/attributes":342,"./plots/layout_attributes":378}],388:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -84138,7 +85591,7 @@ module.exports = function clonePlot(graphObj, options) {
return plotTile;
};
-},{"../lib":287,"../registry":378}],380:[function(_dereq_,module,exports){
+},{"../lib":299,"../registry":387}],389:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -84202,7 +85655,7 @@ function downloadImage(gd, opts) {
module.exports = downloadImage;
-},{"../lib":287,"../plot_api/to_image":326,"./filesaver":381,"./helpers":382}],381:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/to_image":338,"./filesaver":390,"./helpers":391}],390:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -84270,7 +85723,7 @@ function fileSaver(url, name, format) {
module.exports = fileSaver;
-},{"../lib":287,"./helpers":382}],382:[function(_dereq_,module,exports){
+},{"../lib":299,"./helpers":391}],391:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -84339,7 +85792,7 @@ exports.IMAGE_URL_PREFIX = /^data:image\/\w+;base64,/;
exports.MSG_IE_BAD_FORMAT = 'Sorry IE does not support downloading from canvas. Try {format:\'svg\'} instead.';
-},{"../registry":378}],383:[function(_dereq_,module,exports){
+},{"../registry":387}],392:[function(_dereq_,module,exports){
'use strict';
var helpers = _dereq_('./helpers');
@@ -84356,7 +85809,7 @@ var Snapshot = {
module.exports = Snapshot;
-},{"./cloneplot":379,"./download":380,"./helpers":382,"./svgtoimg":384,"./toimage":385,"./tosvg":386}],384:[function(_dereq_,module,exports){
+},{"./cloneplot":388,"./download":389,"./helpers":391,"./svgtoimg":393,"./toimage":394,"./tosvg":395}],393:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -84475,7 +85928,7 @@ function svgToImg(opts) {
module.exports = svgToImg;
-},{"../lib":287,"./helpers":382,"events":27}],385:[function(_dereq_,module,exports){
+},{"../lib":299,"./helpers":391,"events":27}],394:[function(_dereq_,module,exports){
'use strict';
var EventEmitter = _dereq_('events').EventEmitter;
@@ -84544,7 +85997,7 @@ function toImage(gd, opts) {
module.exports = toImage;
-},{"../lib":287,"../registry":378,"./cloneplot":379,"./helpers":382,"./svgtoimg":384,"./tosvg":386,"events":27}],386:[function(_dereq_,module,exports){
+},{"../lib":299,"../registry":387,"./cloneplot":388,"./helpers":391,"./svgtoimg":393,"./tosvg":395,"events":27}],395:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -84718,7 +86171,7 @@ module.exports = function toSVG(gd, format, scale) {
return s;
};
-},{"../components/color":157,"../components/drawing":179,"../constants/xmlns_namespaces":268,"../lib":287,"@plotly/d3":20}],387:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/drawing":180,"../constants/xmlns_namespaces":280,"../lib":299,"@plotly/d3":20}],396:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -84743,7 +86196,7 @@ module.exports = function arraysToCalcdata(cd, trace) {
}
};
-},{"../../lib":287}],388:[function(_dereq_,module,exports){
+},{"../../lib":299}],397:[function(_dereq_,module,exports){
'use strict';
var scatterAttrs = _dereq_('../scatter/attributes');
@@ -84924,7 +86377,7 @@ module.exports = {
}
};
-},{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../scatter/attributes":500,"./constants":390}],389:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../scatter/attributes":509,"./constants":399}],398:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -84999,7 +86452,7 @@ module.exports = function calc(gd, trace) {
return cd;
};
-},{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../scatter/calc_selection":502,"./arrays_to_calcdata":387}],390:[function(_dereq_,module,exports){
+},{"../../components/colorscale/calc":166,"../../components/colorscale/helpers":169,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"../scatter/calc_selection":511,"./arrays_to_calcdata":396}],399:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -85012,7 +86465,7 @@ module.exports = {
eventDataKeys: ['value', 'label']
};
-},{}],391:[function(_dereq_,module,exports){
+},{}],400:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -85787,7 +87240,7 @@ module.exports = {
setGroupPositions: setGroupPositions
};
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../../plots/cartesian/constraints":342,"../../registry":378,"./sieve.js":401,"fast-isnumeric":33}],392:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../../plots/cartesian/constraints":354,"../../registry":387,"./sieve.js":410,"fast-isnumeric":33}],401:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -85966,7 +87419,7 @@ module.exports = {
handleText: handleText
};
-},{"../../components/color":157,"../../lib":287,"../../plots/cartesian/constraints":342,"../../registry":378,"../scatter/period_defaults":520,"../scatter/xy_defaults":527,"./attributes":388,"./style_defaults":403}],393:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../plots/cartesian/constraints":354,"../../registry":387,"../scatter/period_defaults":529,"../scatter/xy_defaults":536,"./attributes":397,"./style_defaults":412}],402:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt, trace) {
@@ -85987,7 +87440,7 @@ module.exports = function eventData(out, pt, trace) {
return out;
};
-},{}],394:[function(_dereq_,module,exports){
+},{}],403:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -86057,7 +87510,7 @@ exports.getLineWidth = function(trace, di) {
return w;
};
-},{"../../lib":287,"fast-isnumeric":33,"tinycolor2":121}],395:[function(_dereq_,module,exports){
+},{"../../lib":299,"fast-isnumeric":33,"tinycolor2":122}],404:[function(_dereq_,module,exports){
'use strict';
var Fx = _dereq_('../../components/fx');
@@ -86282,7 +87735,7 @@ module.exports = {
getTraceColor: getTraceColor
};
-},{"../../components/color":157,"../../components/fx":197,"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"./helpers":394}],396:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx":198,"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./helpers":403}],405:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -86311,7 +87764,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../scatter/marker_colorbar":518,"./arrays_to_calcdata":387,"./attributes":388,"./calc":389,"./cross_trace_calc":391,"./defaults":392,"./event_data":393,"./hover":395,"./layout_attributes":397,"./layout_defaults":398,"./plot":399,"./select":400,"./style":402}],397:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../scatter/marker_colorbar":527,"./arrays_to_calcdata":396,"./attributes":397,"./calc":398,"./cross_trace_calc":400,"./defaults":401,"./event_data":402,"./hover":404,"./layout_attributes":406,"./layout_defaults":407,"./plot":408,"./select":409,"./style":411}],406:[function(_dereq_,module,exports){
'use strict';
@@ -86343,7 +87796,7 @@ module.exports = {
}
};
-},{}],398:[function(_dereq_,module,exports){
+},{}],407:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -86395,7 +87848,7 @@ module.exports = function(layoutIn, layoutOut, fullData) {
coerce('bargroupgap');
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"./layout_attributes":397}],399:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./layout_attributes":406}],408:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -87179,7 +88632,7 @@ module.exports = {
toMoveInsideBar: toMoveInsideBar
};
-},{"../../components/color":157,"../../components/drawing":179,"../../components/fx/helpers":193,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../registry":378,"./attributes":388,"./constants":390,"./helpers":394,"./style":402,"./uniform_text":404,"@plotly/d3":20,"fast-isnumeric":33}],400:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../components/fx/helpers":194,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"./attributes":397,"./constants":399,"./helpers":403,"./style":411,"./uniform_text":413,"@plotly/d3":20,"fast-isnumeric":33}],409:[function(_dereq_,module,exports){
'use strict';
module.exports = function selectPoints(searchInfo, selectionTester) {
@@ -87235,7 +88688,7 @@ function getCentroid(d, xa, ya, isHorizontal, isFunnel) {
}
}
-},{}],401:[function(_dereq_,module,exports){
+},{}],410:[function(_dereq_,module,exports){
'use strict';
module.exports = Sieve;
@@ -87344,7 +88797,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) {
return prefix + label;
};
-},{"../../constants/numerical":267,"../../lib":287}],402:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299}],411:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -87518,7 +88971,7 @@ module.exports = {
resizeText: resizeText
};
-},{"../../components/color":157,"../../components/drawing":179,"../../lib":287,"../../registry":378,"./attributes":388,"./helpers":394,"./uniform_text":404,"@plotly/d3":20}],403:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../lib":299,"../../registry":387,"./attributes":397,"./helpers":403,"./uniform_text":413,"@plotly/d3":20}],412:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -87550,7 +89003,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default
coerce('unselected.marker.color');
};
-},{"../../components/color":157,"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"../../lib":287}],404:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"../../lib":299}],413:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -87629,7 +89082,7 @@ module.exports = {
resizeText: resizeText
};
-},{"../../lib":287,"@plotly/d3":20}],405:[function(_dereq_,module,exports){
+},{"../../lib":299,"@plotly/d3":20}],414:[function(_dereq_,module,exports){
'use strict';
var scatterAttrs = _dereq_('../scatter/attributes');
@@ -87864,7 +89317,7 @@ module.exports = {
}
};
-},{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../bar/attributes":388,"../scatter/attributes":500}],406:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/template_attributes":382,"../bar/attributes":397,"../scatter/attributes":509}],415:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -88310,7 +89763,7 @@ function computeNotchSpan(cdi, N) {
return 1.57 * (cdi.q3 - cdi.q1) / Math.sqrt(N);
}
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"fast-isnumeric":33}],407:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"fast-isnumeric":33}],416:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -88535,7 +89988,7 @@ module.exports = {
setPositionOffset: setPositionOffset
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../plots/cartesian/constraints":342}],408:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../plots/cartesian/constraints":354}],417:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -88845,7 +90298,7 @@ module.exports = {
handlePointsDefaults: handlePointsDefaults
};
-},{"../../components/color":157,"../../lib":287,"../../plots/cartesian/axis_autotype":335,"../../registry":378,"../bar/defaults":392,"../scatter/period_defaults":520,"./attributes":405}],409:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../plots/cartesian/axis_autotype":347,"../../registry":387,"../bar/defaults":401,"../scatter/period_defaults":529,"./attributes":414}],418:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt) {
@@ -88862,7 +90315,7 @@ module.exports = function eventData(out, pt) {
return out;
};
-},{}],410:[function(_dereq_,module,exports){
+},{}],419:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -88909,7 +90362,6 @@ function hoverOnBoxes(pointData, xval, yval, hovermode) {
var trace = cd[0].trace;
var t = cd[0].t;
var isViolin = trace.type === 'violin';
- var closeBoxData = [];
var pLetter, vLetter, pAxis, vAxis, vVal, pVal, dx, dy, dPos,
hoverPseudoDistance, spikePseudoDistance;
@@ -89006,22 +90458,30 @@ function hoverOnBoxes(pointData, xval, yval, hovermode) {
pointData.spikeDistance = dxy(di) * spikePseudoDistance / hoverPseudoDistance;
pointData[spikePosAttr] = pAxis.c2p(di.pos, true);
- // box plots: each "point" gets many labels
- var usedVals = {};
- var attrs = ['med', 'q1', 'q3', 'min', 'max'];
+ var hasMean = trace.boxmean || (trace.meanline || {}).visible;
+ var hasFences = trace.boxpoints || trace.points;
- if(trace.boxmean || (trace.meanline || {}).visible) {
- attrs.push('mean');
- }
- if(trace.boxpoints || trace.points) {
- attrs.push('lf', 'uf');
+ // labels with equal values (e.g. when min === q1) should still be presented in the order they have when they're unequal
+ var attrs =
+ (hasFences && hasMean) ? ['max', 'uf', 'q3', 'med', 'mean', 'q1', 'lf', 'min'] :
+ (hasFences && !hasMean) ? ['max', 'uf', 'q3', 'med', 'q1', 'lf', 'min'] :
+ (!hasFences && hasMean) ? ['max', 'q3', 'med', 'mean', 'q1', 'min'] :
+ ['max', 'q3', 'med', 'q1', 'min'];
+
+ var rev = vAxis.range[1] < vAxis.range[0];
+
+ if(trace.orientation === (rev ? 'v' : 'h')) {
+ attrs.reverse();
}
+ var spikeDistance = pointData.spikeDistance;
+ var spikePosition = pointData[spikePosAttr];
+
+ var closeBoxData = [];
for(var i = 0; i < attrs.length; i++) {
var attr = attrs[i];
- if(!(attr in di) || (di[attr] in usedVals)) continue;
- usedVals[di[attr]] = true;
+ if(!(attr in di)) continue;
// copy out to a new object for each value to label
var val = di[attr];
@@ -89041,17 +90501,27 @@ function hoverOnBoxes(pointData, xval, yval, hovermode) {
pointData2[vLetter + 'err'] = di.sd;
}
- // only keep name and spikes on the first item (median)
- pointData.name = '';
- pointData.spikeDistance = undefined;
- pointData[spikePosAttr] = undefined;
-
// no hovertemplate support yet
pointData2.hovertemplate = false;
closeBoxData.push(pointData2);
}
+ // only keep name and spikes on the median
+ pointData.name = '';
+ pointData.spikeDistance = undefined;
+ pointData[spikePosAttr] = undefined;
+ for(var k = 0; k < closeBoxData.length; k++) {
+ if(closeBoxData[k].attr !== 'med') {
+ closeBoxData[k].name = '';
+ closeBoxData[k].spikeDistance = undefined;
+ closeBoxData[k][spikePosAttr] = undefined;
+ } else {
+ closeBoxData[k].spikeDistance = spikeDistance;
+ closeBoxData[k][spikePosAttr] = spikePosition;
+ }
+ }
+
return closeBoxData;
}
@@ -89141,7 +90611,7 @@ module.exports = {
hoverOnPoints: hoverOnPoints
};
-},{"../../components/color":157,"../../components/fx":197,"../../lib":287,"../../plots/cartesian/axes":334}],411:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx":198,"../../lib":299,"../../plots/cartesian/axes":346}],420:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -89167,7 +90637,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":405,"./calc":406,"./cross_trace_calc":407,"./defaults":408,"./event_data":409,"./hover":410,"./layout_attributes":412,"./layout_defaults":413,"./plot":414,"./select":415,"./style":416}],412:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":414,"./calc":415,"./cross_trace_calc":416,"./defaults":417,"./event_data":418,"./hover":419,"./layout_attributes":421,"./layout_defaults":422,"./plot":423,"./select":424,"./style":425}],421:[function(_dereq_,module,exports){
'use strict';
@@ -89194,7 +90664,7 @@ module.exports = {
}
};
-},{}],413:[function(_dereq_,module,exports){
+},{}],422:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -89232,7 +90702,7 @@ module.exports = {
_supply: _supply
};
-},{"../../lib":287,"../../registry":378,"./layout_attributes":412}],414:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./layout_attributes":421}],423:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -89574,7 +91044,7 @@ module.exports = {
plotBoxMean: plotBoxMean
};
-},{"../../components/drawing":179,"../../lib":287,"@plotly/d3":20}],415:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"@plotly/d3":20}],424:[function(_dereq_,module,exports){
'use strict';
module.exports = function selectPoints(searchInfo, selectionTester) {
@@ -89615,7 +91085,7 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
return selection;
};
-},{}],416:[function(_dereq_,module,exports){
+},{}],425:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -89681,7 +91151,7 @@ module.exports = {
styleOnSelect: styleOnSelect
};
-},{"../../components/color":157,"../../components/drawing":179,"@plotly/d3":20}],417:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"@plotly/d3":20}],426:[function(_dereq_,module,exports){
'use strict';
var heatmapAttrs = _dereq_('../heatmap/attributes');
@@ -89845,7 +91315,7 @@ module.exports = extendFlat({
})
);
-},{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../constants/filter_ops":265,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../heatmap/attributes":439,"../scatter/attributes":500}],418:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../constants/filter_ops":277,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../heatmap/attributes":448,"../scatter/attributes":509}],427:[function(_dereq_,module,exports){
'use strict';
var Colorscale = _dereq_('../../components/colorscale');
@@ -89890,7 +91360,7 @@ module.exports = function calc(gd, trace) {
return cd;
};
-},{"../../components/colorscale":169,"../heatmap/calc":440,"./end_plus":428,"./set_contours":436}],419:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"../heatmap/calc":449,"./end_plus":437,"./set_contours":445}],428:[function(_dereq_,module,exports){
'use strict';
module.exports = function(pathinfo, contours) {
@@ -89972,7 +91442,7 @@ module.exports = function(pathinfo, contours) {
}
};
-},{}],420:[function(_dereq_,module,exports){
+},{}],429:[function(_dereq_,module,exports){
'use strict';
var Colorscale = _dereq_('../../components/colorscale');
@@ -90015,7 +91485,7 @@ module.exports = {
calc: calc
};
-},{"../../components/colorscale":169,"./end_plus":428,"./make_color_map":433}],421:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"./end_plus":437,"./make_color_map":442}],430:[function(_dereq_,module,exports){
'use strict';
module.exports = {
// some constants to help with marching squares algorithm
@@ -90085,7 +91555,7 @@ module.exports = {
}
};
-},{}],422:[function(_dereq_,module,exports){
+},{}],431:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -90170,7 +91640,7 @@ function handleConstraintValueDefaults(coerce, contours) {
}
}
-},{"../../components/color":157,"../../constants/filter_ops":265,"./label_defaults":432,"fast-isnumeric":33}],423:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../constants/filter_ops":277,"./label_defaults":441,"fast-isnumeric":33}],432:[function(_dereq_,module,exports){
'use strict';
var filterOps = _dereq_('../../constants/filter_ops');
@@ -90241,7 +91711,7 @@ function makeInequalitySettings(operation) {
};
}
-},{"../../constants/filter_ops":265,"fast-isnumeric":33}],424:[function(_dereq_,module,exports){
+},{"../../constants/filter_ops":277,"fast-isnumeric":33}],433:[function(_dereq_,module,exports){
'use strict';
module.exports = function handleContourDefaults(traceIn, traceOut, coerce, coerce2) {
@@ -90262,7 +91732,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce, coerc
if(autoContour || !contourSize) coerce('ncontours');
};
-},{}],425:[function(_dereq_,module,exports){
+},{}],434:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90354,7 +91824,7 @@ function copyPathinfo(pi) {
});
}
-},{"../../lib":287}],426:[function(_dereq_,module,exports){
+},{"../../lib":299}],435:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90410,7 +91880,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
}
};
-},{"../../lib":287,"../heatmap/label_defaults":449,"../heatmap/xyz_defaults":454,"../scatter/period_defaults":520,"./attributes":417,"./constraint_defaults":422,"./contours_defaults":424,"./style_defaults":438}],427:[function(_dereq_,module,exports){
+},{"../../lib":299,"../heatmap/label_defaults":458,"../heatmap/xyz_defaults":463,"../scatter/period_defaults":529,"./attributes":426,"./constraint_defaults":431,"./contours_defaults":433,"./style_defaults":447}],436:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90466,7 +91936,7 @@ module.exports = function emptyPathinfo(contours, plotinfo, cd0) {
return pathinfo;
};
-},{"../../lib":287,"./constraint_mapping":423,"./end_plus":428}],428:[function(_dereq_,module,exports){
+},{"../../lib":299,"./constraint_mapping":432,"./end_plus":437}],437:[function(_dereq_,module,exports){
'use strict';
/*
@@ -90477,7 +91947,7 @@ module.exports = function endPlus(contours) {
return contours.end + contours.size / 1e6;
};
-},{}],429:[function(_dereq_,module,exports){
+},{}],438:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90772,7 +92242,7 @@ function getInterpPx(pi, loc, step) {
}
}
-},{"../../lib":287,"./constants":421}],430:[function(_dereq_,module,exports){
+},{"../../lib":299,"./constants":430}],439:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -90801,7 +92271,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return hoverData;
};
-},{"../../components/color":157,"../heatmap/hover":446}],431:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../heatmap/hover":455}],440:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -90821,7 +92291,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":417,"./calc":418,"./colorbar":420,"./defaults":426,"./hover":430,"./plot":435,"./style":437}],432:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":426,"./calc":427,"./colorbar":429,"./defaults":435,"./hover":439,"./plot":444,"./style":446}],441:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90842,7 +92312,7 @@ module.exports = function handleLabelDefaults(coerce, layout, lineColor, opts) {
if(opts.hasHover !== false) coerce('zhoverformat');
};
-},{"../../lib":287}],433:[function(_dereq_,module,exports){
+},{"../../lib":299}],442:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -90918,7 +92388,7 @@ module.exports = function makeColorMap(trace) {
);
};
-},{"../../components/colorscale":169,"./end_plus":428,"@plotly/d3":20}],434:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"./end_plus":437,"@plotly/d3":20}],443:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -91002,7 +92472,7 @@ function getMarchingIndex(val, corners) {
return (mi === 15) ? 0 : mi;
}
-},{"./constants":421}],435:[function(_dereq_,module,exports){
+},{"./constants":430}],444:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -91684,7 +93154,7 @@ function makeClipMask(cd0) {
return z;
}
-},{"../../components/colorscale":169,"../../components/drawing":179,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../plots/cartesian/set_convert":356,"../heatmap/plot":451,"./close_boundaries":419,"./constants":421,"./convert_to_constraints":425,"./empty_pathinfo":427,"./find_all_paths":429,"./make_crossings":434,"@plotly/d3":20}],436:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"../../components/drawing":180,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../plots/cartesian/set_convert":365,"../heatmap/plot":460,"./close_boundaries":428,"./constants":430,"./convert_to_constraints":434,"./empty_pathinfo":436,"./find_all_paths":438,"./make_crossings":443,"@plotly/d3":20}],445:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -91780,7 +93250,7 @@ function autoContours(start, end, ncontours) {
return dummyAx;
}
-},{"../../lib":287,"../../plots/cartesian/axes":334}],437:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346}],446:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -91852,7 +93322,7 @@ module.exports = function style(gd) {
heatmapStyle(gd);
};
-},{"../../components/drawing":179,"../heatmap/style":452,"./make_color_map":433,"@plotly/d3":20}],438:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../heatmap/style":461,"./make_color_map":442,"@plotly/d3":20}],447:[function(_dereq_,module,exports){
'use strict';
var colorscaleDefaults = _dereq_('../../components/colorscale/defaults');
@@ -91888,7 +93358,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout,
handleLabelDefaults(coerce, layout, lineColor, opts);
};
-},{"../../components/colorscale/defaults":167,"./label_defaults":432}],439:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"./label_defaults":441}],448:[function(_dereq_,module,exports){
'use strict';
var scatterAttrs = _dereq_('../scatter/attributes');
@@ -91995,7 +93465,7 @@ module.exports = extendFlat({
colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
);
-},{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../scatter/attributes":500}],440:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../scatter/attributes":509}],449:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -92196,7 +93666,7 @@ function dropZonBreaks(x, y, z) {
return newZ;
}
-},{"../../components/colorscale/calc":165,"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../../registry":378,"../histogram2d/calc":469,"./clean_2d_array":441,"./convert_column_xyz":443,"./find_empties":445,"./interp2d":448,"./make_bound_array":450}],441:[function(_dereq_,module,exports){
+},{"../../components/colorscale/calc":166,"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"../../registry":387,"../histogram2d/calc":478,"./clean_2d_array":450,"./convert_column_xyz":452,"./find_empties":454,"./interp2d":457,"./make_bound_array":459}],450:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -92265,7 +93735,7 @@ module.exports = function clean2dArray(zOld, trace, xa, ya) {
return zNew;
};
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],442:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],451:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -92273,7 +93743,7 @@ module.exports = {
max: 'zmax'
};
-},{}],443:[function(_dereq_,module,exports){
+},{}],452:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92354,7 +93824,7 @@ module.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name,
trace._after2before = after2before;
};
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331}],444:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343}],453:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92395,7 +93865,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
};
-},{"../../components/colorscale/defaults":167,"../../lib":287,"../scatter/period_defaults":520,"./attributes":439,"./label_defaults":449,"./style_defaults":453,"./xyz_defaults":454}],445:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"../../lib":299,"../scatter/period_defaults":529,"./attributes":448,"./label_defaults":458,"./style_defaults":462,"./xyz_defaults":463}],454:[function(_dereq_,module,exports){
'use strict';
var maxRowLength = _dereq_('../../lib').maxRowLength;
@@ -92492,7 +93962,7 @@ module.exports = function findEmpties(z) {
return empties.sort(function(a, b) { return b[2] - a[2]; });
};
-},{"../../lib":287}],446:[function(_dereq_,module,exports){
+},{"../../lib":299}],455:[function(_dereq_,module,exports){
'use strict';
var Fx = _dereq_('../../components/fx');
@@ -92625,7 +94095,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
})];
};
-},{"../../components/colorscale":169,"../../components/fx":197,"../../lib":287,"../../plots/cartesian/axes":334}],447:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"../../components/fx":198,"../../lib":299,"../../plots/cartesian/axes":346}],456:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -92645,7 +94115,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":439,"./calc":440,"./colorbar":442,"./defaults":444,"./hover":446,"./plot":451,"./style":452}],448:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":448,"./calc":449,"./colorbar":451,"./defaults":453,"./hover":455,"./plot":460,"./style":461}],457:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92770,7 +94240,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) {
return maxFractionalChange;
}
-},{"../../lib":287}],449:[function(_dereq_,module,exports){
+},{"../../lib":299}],458:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92785,7 +94255,7 @@ module.exports = function handleHeatmapLabelDefaults(coerce, layout) {
Lib.coerceFont(coerce, 'textfont', fontDflt);
};
-},{"../../lib":287}],450:[function(_dereq_,module,exports){
+},{"../../lib":299}],459:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -92865,7 +94335,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks,
return arrayOut;
};
-},{"../../lib":287,"../../registry":378}],451:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],460:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -93462,7 +94932,7 @@ function putColor(pixels, pxIndex, c) {
pixels[pxIndex + 3] = Math.round(c[3] * 255);
}
-},{"../../components/color":157,"../../components/colorscale":169,"../../components/drawing":179,"../../constants/alignment":262,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../registry":378,"../scatter/format_labels":509,"@plotly/d3":20,"tinycolor2":121}],452:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/colorscale":170,"../../components/drawing":180,"../../constants/alignment":274,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"../scatter/format_labels":518,"@plotly/d3":20,"tinycolor2":122}],461:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -93474,7 +94944,7 @@ module.exports = function style(gd) {
});
};
-},{"@plotly/d3":20}],453:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],462:[function(_dereq_,module,exports){
'use strict';
module.exports = function handleStyleDefaults(traceIn, traceOut, coerce) {
@@ -93488,7 +94958,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce) {
coerce('zhoverformat');
};
-},{}],454:[function(_dereq_,module,exports){
+},{}],463:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -93579,7 +95049,7 @@ function isValidZ(z) {
return (allRowsAreArrays && oneRowIsFilled && hasOneNumber);
}
-},{"../../lib":287,"../../registry":378,"fast-isnumeric":33}],455:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"fast-isnumeric":33}],464:[function(_dereq_,module,exports){
'use strict';
var barAttrs = _dereq_('../bar/attributes');
@@ -93729,7 +95199,7 @@ module.exports = {
}
};
-},{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../bar/attributes":388,"./bin_attributes":457,"./constants":461}],456:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../bar/attributes":397,"./bin_attributes":466,"./constants":470}],465:[function(_dereq_,module,exports){
'use strict';
@@ -93745,7 +95215,7 @@ module.exports = function doAvg(size, counts) {
return total;
};
-},{}],457:[function(_dereq_,module,exports){
+},{}],466:[function(_dereq_,module,exports){
'use strict';
module.exports = function makeBinAttrs(axLetter, match) {
@@ -93766,7 +95236,7 @@ module.exports = function makeBinAttrs(axLetter, match) {
};
};
-},{}],458:[function(_dereq_,module,exports){
+},{}],467:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -93831,7 +95301,7 @@ module.exports = {
}
};
-},{"fast-isnumeric":33}],459:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33}],468:[function(_dereq_,module,exports){
'use strict';
var numConstants = _dereq_('../../constants/numerical');
@@ -93998,7 +95468,7 @@ function dateParts(v, pa, calendar) {
return parts;
}
-},{"../../constants/numerical":267,"../../plots/cartesian/axes":334}],460:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../plots/cartesian/axes":346}],469:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -94570,14 +96040,14 @@ module.exports = {
calcAllAutoBins: calcAllAutoBins
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"../bar/arrays_to_calcdata":387,"./average":456,"./bin_functions":458,"./bin_label_vals":459,"./norm_functions":467,"fast-isnumeric":33}],461:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"../bar/arrays_to_calcdata":396,"./average":465,"./bin_functions":467,"./bin_label_vals":468,"./norm_functions":476,"fast-isnumeric":33}],470:[function(_dereq_,module,exports){
'use strict';
module.exports = {
eventDataKeys: ['binNumber']
};
-},{}],462:[function(_dereq_,module,exports){
+},{}],471:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -94846,7 +96316,7 @@ module.exports = function crossTraceDefaults(fullData, fullLayout) {
}
};
-},{"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../plots/cartesian/constraints":342,"../../registry":378,"../bar/defaults":392}],463:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../plots/cartesian/constraints":354,"../../registry":387,"../bar/defaults":401}],472:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -94925,7 +96395,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || Color.defaultLine, {axis: 'x', inherit: 'y'});
};
-},{"../../components/color":157,"../../lib":287,"../../registry":378,"../bar/defaults":392,"../bar/style_defaults":403,"./attributes":455}],464:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../registry":387,"../bar/defaults":401,"../bar/style_defaults":412,"./attributes":464}],473:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt, trace, cd, pointNumber) {
@@ -94966,7 +96436,7 @@ module.exports = function eventData(out, pt, trace, cd, pointNumber) {
return out;
};
-},{}],465:[function(_dereq_,module,exports){
+},{}],474:[function(_dereq_,module,exports){
'use strict';
var barHover = _dereq_('../bar/hover').hoverPoints;
@@ -94990,7 +96460,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return pts;
};
-},{"../../plots/cartesian/axes":334,"../bar/hover":395}],466:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346,"../bar/hover":404}],475:[function(_dereq_,module,exports){
'use strict';
/**
@@ -95031,7 +96501,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../bar/cross_trace_calc":391,"../bar/layout_attributes":397,"../bar/layout_defaults":398,"../bar/plot":399,"../bar/select":400,"../bar/style":402,"../scatter/marker_colorbar":518,"./attributes":455,"./calc":460,"./cross_trace_defaults":462,"./defaults":463,"./event_data":464,"./hover":465}],467:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../bar/cross_trace_calc":400,"../bar/layout_attributes":406,"../bar/layout_defaults":407,"../bar/plot":408,"../bar/select":409,"../bar/style":411,"../scatter/marker_colorbar":527,"./attributes":464,"./calc":469,"./cross_trace_defaults":471,"./defaults":472,"./event_data":473,"./hover":474}],476:[function(_dereq_,module,exports){
'use strict';
@@ -95057,7 +96527,7 @@ module.exports = {
}
};
-},{}],468:[function(_dereq_,module,exports){
+},{}],477:[function(_dereq_,module,exports){
'use strict';
var histogramAttrs = _dereq_('../histogram/attributes');
@@ -95123,7 +96593,7 @@ module.exports = extendFlat(
colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
);
-},{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../heatmap/attributes":439,"../histogram/attributes":455,"../histogram/bin_attributes":457}],469:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/cartesian/axis_format_attributes":349,"../../plots/template_attributes":382,"../heatmap/attributes":448,"../histogram/attributes":464,"../histogram/bin_attributes":466}],478:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95334,7 +96804,7 @@ function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
return out;
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../histogram/average":456,"../histogram/bin_functions":458,"../histogram/bin_label_vals":459,"../histogram/calc":460,"../histogram/norm_functions":467}],470:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../histogram/average":465,"../histogram/bin_functions":467,"../histogram/bin_label_vals":468,"../histogram/calc":469,"../histogram/norm_functions":476}],479:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95364,7 +96834,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
coerce('yhoverformat');
};
-},{"../../components/colorscale/defaults":167,"../../lib":287,"../heatmap/label_defaults":449,"../heatmap/style_defaults":453,"./attributes":468,"./sample_defaults":473}],471:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"../../lib":299,"../heatmap/label_defaults":458,"../heatmap/style_defaults":462,"./attributes":477,"./sample_defaults":482}],480:[function(_dereq_,module,exports){
'use strict';
var heatmapHover = _dereq_('../heatmap/hover');
@@ -95390,7 +96860,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return pts;
};
-},{"../../plots/cartesian/axes":334,"../heatmap/hover":446}],472:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346,"../heatmap/hover":455}],481:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -95413,7 +96883,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../heatmap/calc":440,"../heatmap/colorbar":442,"../heatmap/plot":451,"../heatmap/style":452,"../histogram/cross_trace_defaults":462,"../histogram/event_data":464,"./attributes":468,"./defaults":470,"./hover":471}],473:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../heatmap/calc":449,"../heatmap/colorbar":451,"../heatmap/plot":460,"../heatmap/style":461,"../histogram/cross_trace_defaults":471,"../histogram/event_data":473,"./attributes":477,"./defaults":479,"./hover":480}],482:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -95450,7 +96920,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout
coerce('autobiny');
};
-},{"../../lib":287,"../../registry":378}],474:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],483:[function(_dereq_,module,exports){
'use strict';
var histogram2dAttrs = _dereq_('../histogram2d/attributes');
@@ -95504,7 +96974,7 @@ module.exports = extendFlat({
})
);
-},{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../contour/attributes":417,"../histogram2d/attributes":468}],475:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../contour/attributes":426,"../histogram2d/attributes":477}],484:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95541,7 +97011,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
}
};
-},{"../../lib":287,"../contour/contours_defaults":424,"../contour/style_defaults":438,"../heatmap/label_defaults":449,"../histogram2d/sample_defaults":473,"./attributes":474}],476:[function(_dereq_,module,exports){
+},{"../../lib":299,"../contour/contours_defaults":433,"../contour/style_defaults":447,"../heatmap/label_defaults":458,"../histogram2d/sample_defaults":482,"./attributes":483}],485:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -95563,7 +97033,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../contour/calc":418,"../contour/colorbar":420,"../contour/hover":430,"../contour/plot":435,"../contour/style":437,"../histogram/cross_trace_defaults":462,"./attributes":474,"./defaults":475}],477:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../contour/calc":427,"../contour/colorbar":429,"../contour/hover":439,"../contour/plot":444,"../contour/style":446,"../histogram/cross_trace_defaults":471,"./attributes":483,"./defaults":484}],486:[function(_dereq_,module,exports){
'use strict';
var baseAttrs = _dereq_('../../plots/attributes');
@@ -95659,7 +97129,7 @@ module.exports = extendFlat({
transforms: undefined
});
-},{"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"./constants":479}],478:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/attributes":342,"../../plots/template_attributes":382,"./constants":488}],487:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95749,7 +97219,7 @@ function makeScaler(trace) {
};
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"./constants":479,"./helpers":482,"fast-isnumeric":33}],479:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":488,"./helpers":491,"fast-isnumeric":33}],488:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -95815,7 +97285,7 @@ module.exports = {
].join('; ')
};
-},{}],480:[function(_dereq_,module,exports){
+},{}],489:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95865,7 +97335,7 @@ module.exports = function supplyDefaults(traceIn, traceOut) {
traceOut._length = null;
};
-},{"../../lib":287,"../../snapshot/helpers":382,"./attributes":477,"./constants":479}],481:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../snapshot/helpers":391,"./attributes":486,"./constants":488}],490:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt) {
@@ -95879,7 +97349,7 @@ module.exports = function eventData(out, pt) {
return out;
};
-},{}],482:[function(_dereq_,module,exports){
+},{}],491:[function(_dereq_,module,exports){
'use strict';
var probeSync = _dereq_('probe-image-size/sync');
@@ -95892,7 +97362,7 @@ exports.getImageSize = function(src) {
return probeSync(buff);
};
-},{"../../snapshot/helpers":382,"buffer/":28,"probe-image-size/sync":97}],483:[function(_dereq_,module,exports){
+},{"../../snapshot/helpers":391,"buffer/":28,"probe-image-size/sync":98}],492:[function(_dereq_,module,exports){
'use strict';
var Fx = _dereq_('../../components/fx');
@@ -95984,7 +97454,7 @@ module.exports = function hoverPoints(pointData, xval, yval) {
})];
};
-},{"../../components/fx":197,"../../lib":287,"./constants":479}],484:[function(_dereq_,module,exports){
+},{"../../components/fx":198,"../../lib":299,"./constants":488}],493:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -96005,7 +97475,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":477,"./calc":478,"./defaults":480,"./event_data":481,"./hover":483,"./plot":485,"./style":486}],485:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":486,"./calc":487,"./defaults":489,"./event_data":490,"./hover":492,"./plot":494,"./style":495}],494:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -96228,7 +97698,7 @@ module.exports = function plot(gd, plotinfo, cdimage, imageLayer) {
});
};
-},{"../../constants/xmlns_namespaces":268,"../../lib":287,"./constants":479,"@plotly/d3":20}],486:[function(_dereq_,module,exports){
+},{"../../constants/xmlns_namespaces":280,"../../lib":299,"./constants":488,"@plotly/d3":20}],495:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -96240,7 +97710,7 @@ module.exports = function style(gd) {
});
};
-},{"@plotly/d3":20}],487:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],496:[function(_dereq_,module,exports){
'use strict';
var baseAttrs = _dereq_('../../plots/attributes');
@@ -96455,7 +97925,7 @@ module.exports = {
}
};
-},{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/domain":364,"../../plots/font_attributes":365,"../../plots/template_attributes":373}],488:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/domain":373,"../../plots/font_attributes":374,"../../plots/template_attributes":382}],497:[function(_dereq_,module,exports){
'use strict';
var plots = _dereq_('../../plots/plots');
@@ -96470,7 +97940,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)
plots.cleanBasePlot(exports.name, newFullData, newFullLayout, oldFullData, oldFullLayout);
};
-},{"../../plots/plots":371}],489:[function(_dereq_,module,exports){
+},{"../../plots/plots":380}],498:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -96647,7 +98117,7 @@ module.exports = {
generateExtendedColors: generateExtendedColors
};
-},{"../../components/color":157,"fast-isnumeric":33,"tinycolor2":121}],490:[function(_dereq_,module,exports){
+},{"../../components/color":158,"fast-isnumeric":33,"tinycolor2":122}],499:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -96770,7 +98240,7 @@ module.exports = {
supplyDefaults: supplyDefaults
};
-},{"../../lib":287,"../../plots/domain":364,"../bar/defaults":392,"./attributes":487,"fast-isnumeric":33}],491:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/domain":373,"../bar/defaults":401,"./attributes":496,"fast-isnumeric":33}],500:[function(_dereq_,module,exports){
'use strict';
var appendArrayMultiPointValues = _dereq_('../../components/fx/helpers').appendArrayMultiPointValues;
@@ -96812,7 +98282,7 @@ module.exports = function eventData(pt, trace) {
return out;
};
-},{"../../components/fx/helpers":193}],492:[function(_dereq_,module,exports){
+},{"../../components/fx/helpers":194}],501:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -96852,7 +98322,7 @@ exports.getRotationAngle = function(rotation) {
return (rotation === 'auto' ? 0 : rotation) * Math.PI / 180;
};
-},{"../../lib":287}],493:[function(_dereq_,module,exports){
+},{"../../lib":299}],502:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -96876,7 +98346,7 @@ module.exports = {
}
};
-},{"./attributes":487,"./base_plot":488,"./calc":489,"./defaults":490,"./layout_attributes":494,"./layout_defaults":495,"./plot":496,"./style":497,"./style_one":498}],494:[function(_dereq_,module,exports){
+},{"./attributes":496,"./base_plot":497,"./calc":498,"./defaults":499,"./layout_attributes":503,"./layout_defaults":504,"./plot":505,"./style":506,"./style_one":507}],503:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -96895,7 +98365,7 @@ module.exports = {
}
};
-},{}],495:[function(_dereq_,module,exports){
+},{}],504:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -96912,7 +98382,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
coerce('extendpiecolors');
};
-},{"../../lib":287,"./layout_attributes":494}],496:[function(_dereq_,module,exports){
+},{"../../lib":299,"./layout_attributes":503}],505:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -98092,7 +99562,7 @@ module.exports = {
computeTransform: computeTransform
};
-},{"../../components/color":157,"../../components/drawing":179,"../../components/fx":197,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../bar/constants":390,"../bar/uniform_text":404,"./event_data":491,"./helpers":492,"@plotly/d3":20}],497:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../components/fx":198,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../bar/constants":399,"../bar/uniform_text":413,"./event_data":500,"./helpers":501,"@plotly/d3":20}],506:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -98117,7 +99587,7 @@ module.exports = function style(gd) {
});
};
-},{"../bar/uniform_text":404,"./style_one":498,"@plotly/d3":20}],498:[function(_dereq_,module,exports){
+},{"../bar/uniform_text":413,"./style_one":507,"@plotly/d3":20}],507:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -98133,7 +99603,7 @@ module.exports = function styleOne(s, pt, trace) {
.call(Color.stroke, lineColor);
};
-},{"../../components/color":157,"./helpers":492}],499:[function(_dereq_,module,exports){
+},{"../../components/color":158,"./helpers":501}],508:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -98176,7 +99646,7 @@ module.exports = function arraysToCalcdata(cd, trace) {
}
};
-},{"../../lib":287}],500:[function(_dereq_,module,exports){
+},{"../../lib":299}],509:[function(_dereq_,module,exports){
'use strict';
var axisHoverFormat = _dereq_('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
@@ -98528,7 +99998,7 @@ module.exports = {
}),
};
-},{"../../components/colorscale/attributes":164,"../../components/drawing":179,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"./constants":504}],501:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing":180,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"./constants":513}],510:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -98825,7 +100295,7 @@ module.exports = {
getStackOpts: getStackOpts
};
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"./arrays_to_calcdata":499,"./calc_selection":502,"./colorscale_calc":503,"./subtypes":525,"fast-isnumeric":33}],502:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"./arrays_to_calcdata":508,"./calc_selection":511,"./colorscale_calc":512,"./subtypes":534,"fast-isnumeric":33}],511:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -98836,7 +100306,7 @@ module.exports = function calcSelection(cd, trace) {
}
};
-},{"../../lib":287}],503:[function(_dereq_,module,exports){
+},{"../../lib":299}],512:[function(_dereq_,module,exports){
'use strict';
var hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;
@@ -98871,7 +100341,7 @@ module.exports = function calcMarkerColorscale(gd, trace) {
}
};
-},{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"./subtypes":525}],504:[function(_dereq_,module,exports){
+},{"../../components/colorscale/calc":166,"../../components/colorscale/helpers":169,"./subtypes":534}],513:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -98891,7 +100361,7 @@ module.exports = {
eventDataKeys: []
};
-},{}],505:[function(_dereq_,module,exports){
+},{}],514:[function(_dereq_,module,exports){
'use strict';
var calc = _dereq_('./calc');
@@ -99063,7 +100533,7 @@ function getInterp(calcTrace, index, position, posAttr) {
return pt0.s + (pt1.s - pt0.s) * (position - pt0[posAttr]) / (pt1[posAttr] - pt0[posAttr]);
}
-},{"./calc":501}],506:[function(_dereq_,module,exports){
+},{"./calc":510}],515:[function(_dereq_,module,exports){
'use strict';
@@ -99093,7 +100563,7 @@ module.exports = function crossTraceDefaults(fullData) {
}
};
-},{}],507:[function(_dereq_,module,exports){
+},{}],516:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -99182,7 +100652,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
Lib.coerceSelectionMarkerOpacity(traceOut, coerce);
};
-},{"../../lib":287,"../../registry":378,"./attributes":500,"./constants":504,"./fillcolor_defaults":508,"./line_defaults":513,"./line_shape_defaults":515,"./marker_defaults":519,"./period_defaults":520,"./stack_defaults":523,"./subtypes":525,"./text_defaults":526,"./xy_defaults":527}],508:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./attributes":509,"./constants":513,"./fillcolor_defaults":517,"./line_defaults":522,"./line_shape_defaults":524,"./marker_defaults":528,"./period_defaults":529,"./stack_defaults":532,"./subtypes":534,"./text_defaults":535,"./xy_defaults":536}],517:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -99210,7 +100680,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe
));
};
-},{"../../components/color":157,"../../lib":287}],509:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299}],518:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -99228,7 +100698,7 @@ module.exports = function formatLabels(cdi, trace, fullLayout) {
return labels;
};
-},{"../../plots/cartesian/axes":334}],510:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346}],519:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -99268,7 +100738,7 @@ module.exports = function getTraceColor(trace, di) {
}
};
-},{"../../components/color":157,"./subtypes":525}],511:[function(_dereq_,module,exports){
+},{"../../components/color":158,"./subtypes":534}],520:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -99479,7 +100949,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
}
};
-},{"../../components/color":157,"../../components/fx":197,"../../lib":287,"../../registry":378,"./get_trace_color":510}],512:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx":198,"../../lib":299,"../../registry":387,"./get_trace_color":519}],521:[function(_dereq_,module,exports){
'use strict';
var subtypes = _dereq_('./subtypes');
@@ -99516,7 +100986,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./arrays_to_calcdata":499,"./attributes":500,"./calc":501,"./cross_trace_calc":505,"./cross_trace_defaults":506,"./defaults":507,"./format_labels":509,"./hover":511,"./marker_colorbar":518,"./plot":521,"./select":522,"./style":524,"./subtypes":525}],513:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./arrays_to_calcdata":508,"./attributes":509,"./calc":510,"./cross_trace_calc":514,"./cross_trace_defaults":515,"./defaults":516,"./format_labels":518,"./hover":520,"./marker_colorbar":527,"./plot":530,"./select":531,"./style":533,"./subtypes":534}],522:[function(_dereq_,module,exports){
'use strict';
var isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;
@@ -99539,7 +101009,7 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout,
if(!(opts || {}).noDash) coerce('line.dash');
};
-},{"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"../../lib":287}],514:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"../../lib":299}],523:[function(_dereq_,module,exports){
'use strict';
var numConstants = _dereq_('../../constants/numerical');
@@ -99991,7 +101461,7 @@ module.exports = function linePoints(d, opts) {
return segments;
};
-},{"../../constants/numerical":267,"../../lib":287,"./constants":504}],515:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"./constants":513}],524:[function(_dereq_,module,exports){
'use strict';
@@ -100001,7 +101471,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) {
if(shape === 'spline') coerce('line.smoothing');
};
-},{}],516:[function(_dereq_,module,exports){
+},{}],525:[function(_dereq_,module,exports){
'use strict';
var LINKEDFILLS = {tonextx: 1, tonexty: 1, tonext: 1};
@@ -100083,7 +101553,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) {
return cdscatterSorted;
};
-},{}],517:[function(_dereq_,module,exports){
+},{}],526:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -100119,7 +101589,7 @@ module.exports = function makeBubbleSizeFn(trace, factor) {
};
};
-},{"fast-isnumeric":33}],518:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33}],527:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -100128,7 +101598,7 @@ module.exports = {
max: 'cmax'
};
-},{}],519:[function(_dereq_,module,exports){
+},{}],528:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -100201,7 +101671,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout
}
};
-},{"../../components/color":157,"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"./subtypes":525}],520:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"./subtypes":534}],529:[function(_dereq_,module,exports){
'use strict';
var dateTick0 = _dereq_('../../lib').dateTick0;
@@ -100240,7 +101710,7 @@ module.exports = function handlePeriodDefaults(traceIn, traceOut, layout, coerce
}
};
-},{"../../constants/numerical":267,"../../lib":287}],521:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299}],530:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -100792,7 +102262,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) {
});
}
-},{"../../components/drawing":179,"../../lib":287,"../../lib/polygon":299,"../../registry":378,"./line_points":514,"./link_traces":516,"./subtypes":525,"@plotly/d3":20}],522:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"../../lib/polygon":311,"../../registry":387,"./line_points":523,"./link_traces":525,"./subtypes":534,"@plotly/d3":20}],531:[function(_dereq_,module,exports){
'use strict';
var subtypes = _dereq_('./subtypes');
@@ -100837,7 +102307,7 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
return selection;
};
-},{"./subtypes":525}],523:[function(_dereq_,module,exports){
+},{"./subtypes":534}],532:[function(_dereq_,module,exports){
'use strict';
var perStackAttrs = ['orientation', 'groupnorm', 'stackgaps'];
@@ -100934,7 +102404,7 @@ module.exports = function handleStackDefaults(traceIn, traceOut, layout, coerce)
}
};
-},{}],524:[function(_dereq_,module,exports){
+},{}],533:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -100996,7 +102466,7 @@ module.exports = {
styleOnSelect: styleOnSelect
};
-},{"../../components/drawing":179,"../../registry":378,"@plotly/d3":20}],525:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../registry":387,"@plotly/d3":20}],534:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101026,7 +102496,7 @@ module.exports = {
}
};
-},{"../../lib":287}],526:[function(_dereq_,module,exports){
+},{"../../lib":299}],535:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101047,7 +102517,7 @@ module.exports = function(traceIn, traceOut, layout, coerce, opts) {
}
};
-},{"../../lib":287}],527:[function(_dereq_,module,exports){
+},{"../../lib":299}],536:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101083,7 +102553,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
return len;
};
-},{"../../lib":287,"../../registry":378}],528:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],537:[function(_dereq_,module,exports){
'use strict';
var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplateAttrs;
@@ -101175,7 +102645,7 @@ module.exports = {
hovertemplate: hovertemplateAttrs(),
};
-},{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"../scatter/attributes":500}],529:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/template_attributes":382,"../scatter/attributes":509}],538:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -101247,7 +102717,7 @@ module.exports = function calc(gd, trace) {
return cd;
};
-},{"../scatter/arrays_to_calcdata":499,"../scatter/calc":501,"../scatter/calc_selection":502,"../scatter/colorscale_calc":503,"fast-isnumeric":33}],530:[function(_dereq_,module,exports){
+},{"../scatter/arrays_to_calcdata":508,"../scatter/calc":510,"../scatter/calc_selection":511,"../scatter/colorscale_calc":512,"fast-isnumeric":33}],539:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101342,7 +102812,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
Lib.coerceSelectionMarkerOpacity(traceOut, coerce);
};
-},{"../../lib":287,"../scatter/constants":504,"../scatter/fillcolor_defaults":508,"../scatter/line_defaults":513,"../scatter/line_shape_defaults":515,"../scatter/marker_defaults":519,"../scatter/subtypes":525,"../scatter/text_defaults":526,"./attributes":528}],531:[function(_dereq_,module,exports){
+},{"../../lib":299,"../scatter/constants":513,"../scatter/fillcolor_defaults":517,"../scatter/line_defaults":522,"../scatter/line_shape_defaults":524,"../scatter/marker_defaults":528,"../scatter/subtypes":534,"../scatter/text_defaults":535,"./attributes":537}],540:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt, trace, cd, pointNumber) {
@@ -101366,7 +102836,7 @@ module.exports = function eventData(out, pt, trace, cd, pointNumber) {
return out;
};
-},{}],532:[function(_dereq_,module,exports){
+},{}],541:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -101382,7 +102852,7 @@ module.exports = function formatLabels(cdi, trace, fullLayout) {
return labels;
};
-},{"../../plots/cartesian/axes":334}],533:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346}],542:[function(_dereq_,module,exports){
'use strict';
var scatterHover = _dereq_('../scatter/hover');
@@ -101448,7 +102918,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
return scatterPointData;
};
-},{"../scatter/hover":511}],534:[function(_dereq_,module,exports){
+},{"../scatter/hover":520}],543:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -101472,7 +102942,7 @@ module.exports = {
}
};
-},{"../../plots/ternary":374,"../scatter/marker_colorbar":518,"../scatter/select":522,"../scatter/style":524,"./attributes":528,"./calc":529,"./defaults":530,"./event_data":531,"./format_labels":532,"./hover":533,"./plot":535}],535:[function(_dereq_,module,exports){
+},{"../../plots/ternary":383,"../scatter/marker_colorbar":527,"../scatter/select":531,"../scatter/style":533,"./attributes":537,"./calc":538,"./defaults":539,"./event_data":540,"./format_labels":541,"./hover":542,"./plot":544}],544:[function(_dereq_,module,exports){
'use strict';
var scatterPlot = _dereq_('../scatter/plot');
@@ -101496,7 +102966,7 @@ module.exports = function plot(gd, ternary, moduleCalcData) {
scatterPlot(gd, plotinfo, moduleCalcData, scatterLayer);
};
-},{"../scatter/plot":521}],536:[function(_dereq_,module,exports){
+},{"../scatter/plot":530}],545:[function(_dereq_,module,exports){
'use strict';
var boxAttrs = _dereq_('../box/attributes');
@@ -101580,6 +103050,8 @@ module.exports = {
hovertext: boxAttrs.hovertext,
hovertemplate: boxAttrs.hovertemplate,
+ quartilemethod: boxAttrs.quartilemethod,
+
box: {
visible: {
valType: 'boolean',
@@ -101652,7 +103124,7 @@ module.exports = {
}
};
-},{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../box/attributes":405}],537:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../box/attributes":414}],546:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101820,7 +103292,7 @@ function calcSpan(trace, cdi, valAxis, bandwidth) {
return spanOut;
}
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../box/calc":406,"./helpers":540}],538:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../box/calc":415,"./helpers":549}],547:[function(_dereq_,module,exports){
'use strict';
var setPositionOffset = _dereq_('../box/cross_trace_calc').setPositionOffset;
@@ -101855,7 +103327,7 @@ module.exports = function crossTraceCalc(gd, plotinfo) {
}
};
-},{"../box/cross_trace_calc":407}],539:[function(_dereq_,module,exports){
+},{"../box/cross_trace_calc":416}],548:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101906,9 +103378,11 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
var meanLineWidth = coerce2('meanline.width', lineWidth);
var meanLineVisible = coerce('meanline.visible', Boolean(meanLineColor || meanLineWidth));
if(!meanLineVisible) traceOut.meanline = {visible: false};
+
+ coerce('quartilemethod');
};
-},{"../../components/color":157,"../../lib":287,"../box/defaults":408,"./attributes":536}],540:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../box/defaults":417,"./attributes":545}],549:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101973,7 +103447,7 @@ exports.getKdeValue = function(calcItem, trace, valueDist) {
exports.extractVal = function(o) { return o.v; };
-},{"../../lib":287}],541:[function(_dereq_,module,exports){
+},{"../../lib":299}],550:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -102032,11 +103506,19 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
kdePointData[vLetter + 'Label'] = vLetter + ': ' + Axes.hoverLabelText(vAxis, vVal, trace[vLetter + 'hoverformat']) + ', ' + cd[0].t.labels.kde + ' ' + kdeVal.toFixed(3);
// move the spike to the KDE point
- kdePointData.spikeDistance = closeBoxData[0].spikeDistance;
+ var medId = 0;
+ for(var k = 0; k < closeBoxData.length; k++) {
+ if(closeBoxData[k].attr === 'med') {
+ medId = k;
+ break;
+ }
+ }
+
+ kdePointData.spikeDistance = closeBoxData[medId].spikeDistance;
var spikePosAttr = pLetter + 'Spike';
- kdePointData[spikePosAttr] = closeBoxData[0][spikePosAttr];
- closeBoxData[0].spikeDistance = undefined;
- closeBoxData[0][spikePosAttr] = undefined;
+ kdePointData[spikePosAttr] = closeBoxData[medId][spikePosAttr];
+ closeBoxData[medId].spikeDistance = undefined;
+ closeBoxData[medId][spikePosAttr] = undefined;
// no hovertemplate support yet
kdePointData.hovertemplate = false;
@@ -102080,7 +103562,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return closeData;
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../box/hover":410,"./helpers":540}],542:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../box/hover":419,"./helpers":549}],551:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -102105,7 +103587,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../box/defaults":408,"../box/select":415,"../scatter/style":524,"./attributes":536,"./calc":537,"./cross_trace_calc":538,"./defaults":539,"./hover":541,"./layout_attributes":543,"./layout_defaults":544,"./plot":545,"./style":546}],543:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../box/defaults":417,"../box/select":424,"../scatter/style":533,"./attributes":545,"./calc":546,"./cross_trace_calc":547,"./defaults":548,"./hover":550,"./layout_attributes":552,"./layout_defaults":553,"./plot":554,"./style":555}],552:[function(_dereq_,module,exports){
'use strict';
var boxLayoutAttrs = _dereq_('../box/layout_attributes');
@@ -102120,7 +103602,7 @@ module.exports = {
})
};
-},{"../../lib":287,"../box/layout_attributes":412}],544:[function(_dereq_,module,exports){
+},{"../../lib":299,"../box/layout_attributes":421}],553:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -102134,7 +103616,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
boxLayoutDefaults._supply(layoutIn, layoutOut, fullData, coerce, 'violin');
};
-},{"../../lib":287,"../box/layout_defaults":413,"./layout_attributes":543}],545:[function(_dereq_,module,exports){
+},{"../../lib":299,"../box/layout_defaults":422,"./layout_attributes":552}],554:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -102316,7 +103798,7 @@ module.exports = function plot(gd, plotinfo, cdViolins, violinLayer) {
});
};
-},{"../../components/drawing":179,"../../lib":287,"../box/plot":414,"../scatter/line_points":514,"./helpers":540,"@plotly/d3":20}],546:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"../box/plot":423,"../scatter/line_points":523,"./helpers":549,"@plotly/d3":20}],555:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -102363,7 +103845,7 @@ module.exports = function style(gd) {
});
};
-},{"../../components/color":157,"../scatter/style":524,"@plotly/d3":20}],547:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../scatter/style":533,"@plotly/d3":20}],556:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../plots/cartesian/axes');
@@ -102767,7 +104249,7 @@ function last(array, indices) {
return array[indices[indices.length - 1]];
}
-},{"../constants/numerical":267,"../lib":287,"../plot_api/plot_schema":322,"../plots/cartesian/axes":334,"./helpers":550}],548:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"../lib":299,"../plot_api/plot_schema":334,"../plots/cartesian/axes":346,"./helpers":559}],557:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -103027,7 +104509,7 @@ function getFilterFunc(opts, d2c, targetCalendar) {
}
}
-},{"../constants/filter_ops":265,"../lib":287,"../plots/cartesian/axes":334,"../registry":378,"./helpers":550}],549:[function(_dereq_,module,exports){
+},{"../constants/filter_ops":277,"../lib":299,"../plots/cartesian/axes":346,"../registry":387,"./helpers":559}],558:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -103271,7 +104753,7 @@ function transformOne(trace, state) {
return newData;
}
-},{"../lib":287,"../plot_api/plot_schema":322,"../plots/plots":371,"./helpers":550}],550:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_schema":334,"../plots/plots":380,"./helpers":559}],559:[function(_dereq_,module,exports){
'use strict';
exports.pointsAccessorFunction = function(transforms, opts) {
@@ -103289,7 +104771,7 @@ exports.pointsAccessorFunction = function(transforms, opts) {
return originalPointsAccessor;
};
-},{}],551:[function(_dereq_,module,exports){
+},{}],560:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -103427,11 +104909,11 @@ function getSortFunc(opts, d2c) {
}
}
-},{"../constants/numerical":267,"../lib":287,"../plots/cartesian/axes":334,"./helpers":550}],552:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"../lib":299,"../plots/cartesian/axes":346,"./helpers":559}],561:[function(_dereq_,module,exports){
'use strict';
// package version injected by `npm run preprocess`
-exports.version = '2.12.1';
+exports.version = '2.13.2';
},{}]},{},[15])(15)
});
diff --git a/static/babybuddy/js/graph.770f14765845.js.gz b/static/babybuddy/js/graph.770f14765845.js.gz
new file mode 100644
index 00000000..a1821bb8
Binary files /dev/null and b/static/babybuddy/js/graph.770f14765845.js.gz differ
diff --git a/static/babybuddy/js/graph.81d7e15ea5a8.js.gz b/static/babybuddy/js/graph.81d7e15ea5a8.js.gz
deleted file mode 100644
index cb12d977..00000000
Binary files a/static/babybuddy/js/graph.81d7e15ea5a8.js.gz and /dev/null differ
diff --git a/static/babybuddy/js/graph.js b/static/babybuddy/js/graph.js
index 39cd576d..4443da67 100644
--- a/static/babybuddy/js/graph.js
+++ b/static/babybuddy/js/graph.js
@@ -1,5 +1,5 @@
/**
-* plotly.js (cartesian) v2.12.1
+* plotly.js (cartesian) v2.13.2
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
@@ -55,9 +55,6 @@ var rules = {
"X [data-title]:after": "content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;",
"X .vertical [data-title]:before,X .vertical [data-title]:after": "top:0%;right:200%;",
"X .vertical [data-title]:before": "border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",
- "X .select-outline": "fill:none;stroke-width:1;shape-rendering:crispEdges;",
- "X .select-outline-1": "stroke:#fff;",
- "X .select-outline-2": "stroke:#000;stroke-dasharray:2px 2px;",
Y: "font-family:\"Open Sans\",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
"Y p": "margin:0;",
"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,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;",
@@ -72,72 +69,72 @@ for(var selector in rules) {
Lib.addStyleRule(fullSelector, rules[selector]);
}
-},{"../src/lib":287}],2:[function(_dereq_,module,exports){
+},{"../src/lib":299}],2:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/aggregate');
-},{"../src/transforms/aggregate":547}],3:[function(_dereq_,module,exports){
+},{"../src/transforms/aggregate":556}],3:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/bar');
-},{"../src/traces/bar":396}],4:[function(_dereq_,module,exports){
+},{"../src/traces/bar":405}],4:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/box');
-},{"../src/traces/box":411}],5:[function(_dereq_,module,exports){
+},{"../src/traces/box":420}],5:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/components/calendars');
-},{"../src/components/calendars":155}],6:[function(_dereq_,module,exports){
+},{"../src/components/calendars":156}],6:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/contour');
-},{"../src/traces/contour":431}],7:[function(_dereq_,module,exports){
+},{"../src/traces/contour":440}],7:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/core');
-},{"../src/core":269}],8:[function(_dereq_,module,exports){
+},{"../src/core":281}],8:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/filter');
-},{"../src/transforms/filter":548}],9:[function(_dereq_,module,exports){
+},{"../src/transforms/filter":557}],9:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/groupby');
-},{"../src/transforms/groupby":549}],10:[function(_dereq_,module,exports){
+},{"../src/transforms/groupby":558}],10:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/heatmap');
-},{"../src/traces/heatmap":447}],11:[function(_dereq_,module,exports){
+},{"../src/traces/heatmap":456}],11:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/histogram');
-},{"../src/traces/histogram":466}],12:[function(_dereq_,module,exports){
+},{"../src/traces/histogram":475}],12:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/histogram2d');
-},{"../src/traces/histogram2d":472}],13:[function(_dereq_,module,exports){
+},{"../src/traces/histogram2d":481}],13:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/histogram2dcontour');
-},{"../src/traces/histogram2dcontour":476}],14:[function(_dereq_,module,exports){
+},{"../src/traces/histogram2dcontour":485}],14:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/image');
-},{"../src/traces/image":484}],15:[function(_dereq_,module,exports){
+},{"../src/traces/image":493}],15:[function(_dereq_,module,exports){
'use strict';
var Plotly = _dereq_('./core');
@@ -173,22 +170,22 @@ module.exports = Plotly;
module.exports = _dereq_('../src/traces/pie');
-},{"../src/traces/pie":493}],17:[function(_dereq_,module,exports){
+},{"../src/traces/pie":502}],17:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/scatterternary');
-},{"../src/traces/scatterternary":534}],18:[function(_dereq_,module,exports){
+},{"../src/traces/scatterternary":543}],18:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/transforms/sort');
-},{"../src/transforms/sort":551}],19:[function(_dereq_,module,exports){
+},{"../src/transforms/sort":560}],19:[function(_dereq_,module,exports){
'use strict';
module.exports = _dereq_('../src/traces/violin');
-},{"../src/traces/violin":542}],20:[function(_dereq_,module,exports){
+},{"../src/traces/violin":551}],20:[function(_dereq_,module,exports){
!function() {
var d3 = {
version: "3.8.0"
@@ -8148,7 +8145,7 @@ function hasOwnProperty(obj, prop) {
}
}).call(this)}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":23,"_process":98,"inherits":22}],25:[function(_dereq_,module,exports){
+},{"./support/isBuffer":23,"_process":99,"inherits":22}],25:[function(_dereq_,module,exports){
'use strict'
exports.byteLength = byteLength
@@ -13884,7 +13881,7 @@ function getBoundingClientOffset (element) {
});
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},_dereq_("timers").setImmediate)
-},{"timers":120}],73:[function(_dereq_,module,exports){
+},{"timers":121}],73:[function(_dereq_,module,exports){
/*
object-assign
(c) Sindre Sorhus
@@ -14036,6 +14033,26 @@ function parseValues(args) {
}
},{}],75:[function(_dereq_,module,exports){
+// ray-casting algorithm based on
+// https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html
+
+module.exports = function pointInPolygonNested (point, vs, start, end) {
+ var x = point[0], y = point[1];
+ var inside = false;
+ if (start === undefined) start = 0;
+ if (end === undefined) end = vs.length;
+ var len = end - start;
+ for (var i = 0, j = len - 1; i < len; j = i++) {
+ var xi = vs[i+start][0], yi = vs[i+start][1];
+ var xj = vs[j+start][0], yj = vs[j+start][1];
+ var intersect = ((yi > y) !== (yj > y))
+ && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);
+ if (intersect) inside = !inside;
+ }
+ return inside;
+};
+
+},{}],76:[function(_dereq_,module,exports){
/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
@@ -14163,7 +14180,7 @@ if (typeof window === 'object')
module.exports = PolyBool;
-},{"./lib/build-log":76,"./lib/epsilon":77,"./lib/geojson":78,"./lib/intersecter":79,"./lib/segment-chainer":81,"./lib/segment-selector":82}],76:[function(_dereq_,module,exports){
+},{"./lib/build-log":77,"./lib/epsilon":78,"./lib/geojson":79,"./lib/intersecter":80,"./lib/segment-chainer":82,"./lib/segment-selector":83}],77:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -14278,7 +14295,7 @@ function BuildLog(){
module.exports = BuildLog;
-},{}],77:[function(_dereq_,module,exports){
+},{}],78:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -14450,7 +14467,7 @@ function Epsilon(eps){
module.exports = Epsilon;
-},{}],78:[function(_dereq_,module,exports){
+},{}],79:[function(_dereq_,module,exports){
// (c) Copyright 2017, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -14640,7 +14657,7 @@ var GeoJSON = {
module.exports = GeoJSON;
-},{}],79:[function(_dereq_,module,exports){
+},{}],80:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15147,7 +15164,7 @@ function Intersecter(selfIntersection, eps, buildLog){
module.exports = Intersecter;
-},{"./linked-list":80}],80:[function(_dereq_,module,exports){
+},{"./linked-list":81}],81:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15230,7 +15247,7 @@ var LinkedList = {
module.exports = LinkedList;
-},{}],81:[function(_dereq_,module,exports){
+},{}],82:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15484,7 +15501,7 @@ function SegmentChainer(segments, eps, buildLog){
module.exports = SegmentChainer;
-},{}],82:[function(_dereq_,module,exports){
+},{}],83:[function(_dereq_,module,exports){
// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc
// MIT License
// Project Home: https://github.com/voidqk/polybooljs
@@ -15652,7 +15669,7 @@ var SegmentSelector = {
module.exports = SegmentSelector;
-},{}],83:[function(_dereq_,module,exports){
+},{}],84:[function(_dereq_,module,exports){
'use strict';
@@ -15748,7 +15765,7 @@ ProbeError.prototype.constructor = ProbeError;
exports.ProbeError = ProbeError;
-},{"stream":100,"stream-parser":116}],84:[function(_dereq_,module,exports){
+},{"stream":101,"stream-parser":117}],85:[function(_dereq_,module,exports){
/* eslint-disable no-bitwise */
/* eslint-disable consistent-return */
@@ -16020,7 +16037,7 @@ module.exports.get_orientation = function (data) {
}
};
-},{}],85:[function(_dereq_,module,exports){
+},{}],86:[function(_dereq_,module,exports){
// Utils used to parse miaf-based files (avif/heic/heif)
//
// ISO media file spec:
@@ -16323,7 +16340,7 @@ module.exports.getMimeType = function (data) {
return { type: 'avif', mime: 'image/avif' };
};
-},{"./common":83}],86:[function(_dereq_,module,exports){
+},{"./common":84}],87:[function(_dereq_,module,exports){
// Utils used to parse miaf-based files (avif/heic/heif)
//
// - image collections are not supported (only last size is reported)
@@ -16413,7 +16430,7 @@ module.exports = function (data) {
return result;
};
-},{"../common":83,"../exif_utils":84,"../miaf_utils":85}],87:[function(_dereq_,module,exports){
+},{"../common":84,"../exif_utils":85,"../miaf_utils":86}],88:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16440,7 +16457,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],88:[function(_dereq_,module,exports){
+},{"../common":84}],89:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16469,7 +16486,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],89:[function(_dereq_,module,exports){
+},{"../common":84}],90:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16516,7 +16533,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],90:[function(_dereq_,module,exports){
+},{"../common":84}],91:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16605,7 +16622,7 @@ module.exports = function (data) {
}
};
-},{"../common":83,"../exif_utils":84}],91:[function(_dereq_,module,exports){
+},{"../common":84,"../exif_utils":85}],92:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16638,7 +16655,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],92:[function(_dereq_,module,exports){
+},{"../common":84}],93:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16667,7 +16684,7 @@ module.exports = function (data) {
};
};
-},{"../common":83}],93:[function(_dereq_,module,exports){
+},{"../common":84}],94:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16814,7 +16831,7 @@ module.exports = function (data) {
};
};
-},{}],94:[function(_dereq_,module,exports){
+},{}],95:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable consistent-return */
@@ -16902,7 +16919,7 @@ module.exports = function (data) {
}
};
-},{"../common":83}],95:[function(_dereq_,module,exports){
+},{"../common":84}],96:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable no-bitwise */
@@ -17014,7 +17031,7 @@ module.exports = function (data) {
return result;
};
-},{"../common":83,"../exif_utils":84}],96:[function(_dereq_,module,exports){
+},{"../common":84,"../exif_utils":85}],97:[function(_dereq_,module,exports){
'use strict';
@@ -17031,7 +17048,7 @@ module.exports = {
webp: _dereq_('./parse_sync/webp')
};
-},{"./parse_sync/avif":86,"./parse_sync/bmp":87,"./parse_sync/gif":88,"./parse_sync/ico":89,"./parse_sync/jpeg":90,"./parse_sync/png":91,"./parse_sync/psd":92,"./parse_sync/svg":93,"./parse_sync/tiff":94,"./parse_sync/webp":95}],97:[function(_dereq_,module,exports){
+},{"./parse_sync/avif":87,"./parse_sync/bmp":88,"./parse_sync/gif":89,"./parse_sync/ico":90,"./parse_sync/jpeg":91,"./parse_sync/png":92,"./parse_sync/psd":93,"./parse_sync/svg":94,"./parse_sync/tiff":95,"./parse_sync/webp":96}],98:[function(_dereq_,module,exports){
'use strict';
@@ -17061,7 +17078,7 @@ module.exports = function get_image_size(src) {
module.exports.parsers = parsers;
-},{"./lib/parsers_sync":96}],98:[function(_dereq_,module,exports){
+},{"./lib/parsers_sync":97}],99:[function(_dereq_,module,exports){
// shim for using process in browser
var process = module.exports = {};
@@ -17247,7 +17264,7 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],99:[function(_dereq_,module,exports){
+},{}],100:[function(_dereq_,module,exports){
/* eslint-disable node/no-deprecated-api */
var buffer = _dereq_('buffer')
var Buffer = buffer.Buffer
@@ -17313,7 +17330,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
return buffer.SlowBuffer(size)
}
-},{"buffer":28}],100:[function(_dereq_,module,exports){
+},{"buffer":28}],101:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -17444,7 +17461,7 @@ Stream.prototype.pipe = function(dest, options) {
return dest;
};
-},{"events":27,"inherits":67,"readable-stream/lib/_stream_duplex.js":102,"readable-stream/lib/_stream_passthrough.js":103,"readable-stream/lib/_stream_readable.js":104,"readable-stream/lib/_stream_transform.js":105,"readable-stream/lib/_stream_writable.js":106,"readable-stream/lib/internal/streams/end-of-stream.js":110,"readable-stream/lib/internal/streams/pipeline.js":112}],101:[function(_dereq_,module,exports){
+},{"events":27,"inherits":67,"readable-stream/lib/_stream_duplex.js":103,"readable-stream/lib/_stream_passthrough.js":104,"readable-stream/lib/_stream_readable.js":105,"readable-stream/lib/_stream_transform.js":106,"readable-stream/lib/_stream_writable.js":107,"readable-stream/lib/internal/streams/end-of-stream.js":111,"readable-stream/lib/internal/streams/pipeline.js":113}],102:[function(_dereq_,module,exports){
'use strict';
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
@@ -17573,7 +17590,7 @@ createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
module.exports.codes = codes;
-},{}],102:[function(_dereq_,module,exports){
+},{}],103:[function(_dereq_,module,exports){
(function (process){(function (){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -17715,7 +17732,7 @@ Object.defineProperty(Duplex.prototype, 'destroyed', {
}
});
}).call(this)}).call(this,_dereq_('_process'))
-},{"./_stream_readable":104,"./_stream_writable":106,"_process":98,"inherits":67}],103:[function(_dereq_,module,exports){
+},{"./_stream_readable":105,"./_stream_writable":107,"_process":99,"inherits":67}],104:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -17755,7 +17772,7 @@ function PassThrough(options) {
PassThrough.prototype._transform = function (chunk, encoding, cb) {
cb(null, chunk);
};
-},{"./_stream_transform":105,"inherits":67}],104:[function(_dereq_,module,exports){
+},{"./_stream_transform":106,"inherits":67}],105:[function(_dereq_,module,exports){
(function (process,global){(function (){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -18882,7 +18899,7 @@ function indexOf(xs, x) {
return -1;
}
}).call(this)}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../errors":101,"./_stream_duplex":102,"./internal/streams/async_iterator":107,"./internal/streams/buffer_list":108,"./internal/streams/destroy":109,"./internal/streams/from":111,"./internal/streams/state":113,"./internal/streams/stream":114,"_process":98,"buffer":28,"events":27,"inherits":67,"string_decoder/":115,"util":26}],105:[function(_dereq_,module,exports){
+},{"../errors":102,"./_stream_duplex":103,"./internal/streams/async_iterator":108,"./internal/streams/buffer_list":109,"./internal/streams/destroy":110,"./internal/streams/from":112,"./internal/streams/state":114,"./internal/streams/stream":115,"_process":99,"buffer":28,"events":27,"inherits":67,"string_decoder/":116,"util":26}],106:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -19084,7 +19101,7 @@ function done(stream, er, data) {
if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
return stream.push(null);
}
-},{"../errors":101,"./_stream_duplex":102,"inherits":67}],106:[function(_dereq_,module,exports){
+},{"../errors":102,"./_stream_duplex":103,"inherits":67}],107:[function(_dereq_,module,exports){
(function (process,global){(function (){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -19784,7 +19801,7 @@ Writable.prototype._destroy = function (err, cb) {
cb(err);
};
}).call(this)}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../errors":101,"./_stream_duplex":102,"./internal/streams/destroy":109,"./internal/streams/state":113,"./internal/streams/stream":114,"_process":98,"buffer":28,"inherits":67,"util-deprecate":122}],107:[function(_dereq_,module,exports){
+},{"../errors":102,"./_stream_duplex":103,"./internal/streams/destroy":110,"./internal/streams/state":114,"./internal/streams/stream":115,"_process":99,"buffer":28,"inherits":67,"util-deprecate":123}],108:[function(_dereq_,module,exports){
(function (process){(function (){
'use strict';
@@ -19994,7 +20011,7 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat
module.exports = createReadableStreamAsyncIterator;
}).call(this)}).call(this,_dereq_('_process'))
-},{"./end-of-stream":110,"_process":98}],108:[function(_dereq_,module,exports){
+},{"./end-of-stream":111,"_process":99}],109:[function(_dereq_,module,exports){
'use strict';
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
@@ -20205,7 +20222,7 @@ function () {
return BufferList;
}();
-},{"buffer":28,"util":26}],109:[function(_dereq_,module,exports){
+},{"buffer":28,"util":26}],110:[function(_dereq_,module,exports){
(function (process){(function (){
'use strict'; // undocumented cb() API, needed for core, not for public API
@@ -20313,7 +20330,7 @@ module.exports = {
errorOrDestroy: errorOrDestroy
};
}).call(this)}).call(this,_dereq_('_process'))
-},{"_process":98}],110:[function(_dereq_,module,exports){
+},{"_process":99}],111:[function(_dereq_,module,exports){
// Ported from https://github.com/mafintosh/end-of-stream with
// permission from the author, Mathias Buus (@mafintosh).
'use strict';
@@ -20418,12 +20435,12 @@ function eos(stream, opts, callback) {
}
module.exports = eos;
-},{"../../../errors":101}],111:[function(_dereq_,module,exports){
+},{"../../../errors":102}],112:[function(_dereq_,module,exports){
module.exports = function () {
throw new Error('Readable.from is not available in the browser')
};
-},{}],112:[function(_dereq_,module,exports){
+},{}],113:[function(_dereq_,module,exports){
// Ported from https://github.com/mafintosh/pump with
// permission from the author, Mathias Buus (@mafintosh).
'use strict';
@@ -20521,7 +20538,7 @@ function pipeline() {
}
module.exports = pipeline;
-},{"../../../errors":101,"./end-of-stream":110}],113:[function(_dereq_,module,exports){
+},{"../../../errors":102,"./end-of-stream":111}],114:[function(_dereq_,module,exports){
'use strict';
var ERR_INVALID_OPT_VALUE = _dereq_('../../../errors').codes.ERR_INVALID_OPT_VALUE;
@@ -20549,10 +20566,10 @@ function getHighWaterMark(state, options, duplexKey, isDuplex) {
module.exports = {
getHighWaterMark: getHighWaterMark
};
-},{"../../../errors":101}],114:[function(_dereq_,module,exports){
+},{"../../../errors":102}],115:[function(_dereq_,module,exports){
module.exports = _dereq_('events').EventEmitter;
-},{"events":27}],115:[function(_dereq_,module,exports){
+},{"events":27}],116:[function(_dereq_,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -20849,7 +20866,7 @@ function simpleWrite(buf) {
function simpleEnd(buf) {
return buf && buf.length ? this.write(buf) : '';
}
-},{"safe-buffer":99}],116:[function(_dereq_,module,exports){
+},{"safe-buffer":100}],117:[function(_dereq_,module,exports){
(function (process,Buffer){(function (){
/**
@@ -21152,7 +21169,7 @@ function trampoline (fn) {
}
}).call(this)}).call(this,_dereq_('_process'),_dereq_("buffer").Buffer)
-},{"_process":98,"assert":21,"buffer":28,"debug":117}],117:[function(_dereq_,module,exports){
+},{"_process":99,"assert":21,"buffer":28,"debug":118}],118:[function(_dereq_,module,exports){
(function (process){(function (){
/**
* This is the web browser implementation of `debug()`.
@@ -21341,7 +21358,7 @@ function localstorage() {
}
}).call(this)}).call(this,_dereq_('_process'))
-},{"./debug":118,"_process":98}],118:[function(_dereq_,module,exports){
+},{"./debug":119,"_process":99}],119:[function(_dereq_,module,exports){
/**
* This is the common logic for both the Node.js and web browser
@@ -21545,7 +21562,7 @@ function coerce(val) {
return val;
}
-},{"ms":119}],119:[function(_dereq_,module,exports){
+},{"ms":120}],120:[function(_dereq_,module,exports){
/**
* Helpers.
*/
@@ -21699,7 +21716,7 @@ function plural(ms, n, name) {
return Math.ceil(ms / n) + ' ' + name + 's';
}
-},{}],120:[function(_dereq_,module,exports){
+},{}],121:[function(_dereq_,module,exports){
(function (setImmediate,clearImmediate){(function (){
var nextTick = _dereq_('process/browser.js').nextTick;
var apply = Function.prototype.apply;
@@ -21778,7 +21795,7 @@ exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate :
delete immediateIds[id];
};
}).call(this)}).call(this,_dereq_("timers").setImmediate,_dereq_("timers").clearImmediate)
-},{"process/browser.js":98,"timers":120}],121:[function(_dereq_,module,exports){
+},{"process/browser.js":99,"timers":121}],122:[function(_dereq_,module,exports){
// TinyColor v1.4.2
// https://github.com/bgrins/TinyColor
// Brian Grinstead, MIT License
@@ -22975,7 +22992,7 @@ else {
})(Math);
-},{}],122:[function(_dereq_,module,exports){
+},{}],123:[function(_dereq_,module,exports){
(function (global){(function (){
/**
@@ -23046,7 +23063,7 @@ function config (name) {
}
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],123:[function(_dereq_,module,exports){
+},{}],124:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -23779,7 +23796,7 @@ function toSolar(yearOrDate, monthOrResult, day, isIntercalaryOrResult, result)
}
-},{"../main":137,"object-assign":73}],124:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],125:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -23963,7 +23980,7 @@ assign(CopticCalendar.prototype, {
main.calendars.coptic = CopticCalendar;
-},{"../main":137,"object-assign":73}],125:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],126:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24191,7 +24208,7 @@ var centuries = {
main.calendars.discworld = DiscworldCalendar;
-},{"../main":137,"object-assign":73}],126:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],127:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24375,7 +24392,7 @@ assign(EthiopianCalendar.prototype, {
main.calendars.ethiopian = EthiopianCalendar;
-},{"../main":137,"object-assign":73}],127:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],128:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24649,7 +24666,7 @@ function mod(a, b) {
main.calendars.hebrew = HebrewCalendar;
-},{"../main":137,"object-assign":73}],128:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],129:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -24830,7 +24847,7 @@ assign(IslamicCalendar.prototype, {
main.calendars.islamic = IslamicCalendar;
-},{"../main":137,"object-assign":73}],129:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],130:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25013,7 +25030,7 @@ assign(JulianCalendar.prototype, {
main.calendars.julian = JulianCalendar;
-},{"../main":137,"object-assign":73}],130:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],131:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25308,7 +25325,7 @@ function amod(a, b) {
main.calendars.mayan = MayanCalendar;
-},{"../main":137,"object-assign":73}],131:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],132:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25488,7 +25505,7 @@ assign(NanakshahiCalendar.prototype, {
main.calendars.nanakshahi = NanakshahiCalendar;
-},{"../main":137,"object-assign":73}],132:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],133:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -25911,7 +25928,7 @@ assign(NepaliCalendar.prototype, {
main.calendars.nepali = NepaliCalendar;
-},{"../main":137,"object-assign":73}],133:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],134:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26101,7 +26118,7 @@ main.calendars.persian = PersianCalendar;
main.calendars.jalali = PersianCalendar;
-},{"../main":137,"object-assign":73}],134:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],135:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26287,7 +26304,7 @@ assign(TaiwanCalendar.prototype, {
main.calendars.taiwan = TaiwanCalendar;
-},{"../main":137,"object-assign":73}],135:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],136:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26473,7 +26490,7 @@ assign(ThaiCalendar.prototype, {
main.calendars.thai = ThaiCalendar;
-},{"../main":137,"object-assign":73}],136:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],137:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -26838,7 +26855,7 @@ var ummalqura_dat = [
79990];
-},{"../main":137,"object-assign":73}],137:[function(_dereq_,module,exports){
+},{"../main":138,"object-assign":73}],138:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -27743,7 +27760,7 @@ _exports.baseCalendar = BaseCalendar;
_exports.calendars.gregorian = GregorianCalendar;
-},{"object-assign":73}],138:[function(_dereq_,module,exports){
+},{"object-assign":73}],139:[function(_dereq_,module,exports){
/*
* World Calendars
* https://github.com/alexcjohnson/world-calendars
@@ -28245,7 +28262,7 @@ assign(main.baseCalendar.prototype, {
});
-},{"./main":137,"object-assign":73}],139:[function(_dereq_,module,exports){
+},{"./main":138,"object-assign":73}],140:[function(_dereq_,module,exports){
'use strict';
/**
@@ -28308,7 +28325,7 @@ module.exports = [
}
];
-},{}],140:[function(_dereq_,module,exports){
+},{}],141:[function(_dereq_,module,exports){
'use strict';
var ARROWPATHS = _dereq_('./arrow_paths');
@@ -28596,7 +28613,7 @@ module.exports = templatedArray('annotation', {
}
});
-},{"../../constants/axis_placeable_objects":263,"../../plot_api/plot_template":323,"../../plots/cartesian/constants":341,"../../plots/font_attributes":365,"./arrow_paths":139}],141:[function(_dereq_,module,exports){
+},{"../../constants/axis_placeable_objects":275,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353,"../../plots/font_attributes":374,"./arrow_paths":140}],142:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -28678,7 +28695,7 @@ function calcAxisExpansion(ann, ax) {
ann._extremes[axId] = extremes;
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"./draw":146}],142:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./draw":147}],143:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -28808,7 +28825,7 @@ function clickData2r(d, ax) {
return ax.type === 'log' ? ax.l2r(d) : ax.d2r(d);
}
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378}],143:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387}],144:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -28879,7 +28896,7 @@ module.exports = function handleAnnotationCommonDefaults(annIn, annOut, fullLayo
coerce('captureevents', !!hoverText);
};
-},{"../../lib":287,"../color":157}],144:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158}],145:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -28933,7 +28950,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) {
}
};
-},{"../../lib/to_log_range":312,"fast-isnumeric":33}],145:[function(_dereq_,module,exports){
+},{"../../lib/to_log_range":324,"fast-isnumeric":33}],146:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -29032,7 +29049,7 @@ function handleAnnotationDefaults(annIn, annOut, fullLayout) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"./attributes":140,"./common_defaults":143}],146:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":141,"./common_defaults":144}],147:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -29785,7 +29802,7 @@ function drawRaw(gd, options, index, subplotId, xa, ya) {
} else annText.call(textLayout);
}
-},{"../../lib":287,"../../lib/setcursor":307,"../../lib/svg_text_utils":310,"../../plot_api/plot_template":323,"../../plots/cartesian/axes":334,"../../plots/plots":371,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"../fx":197,"./draw_arrow_head":147,"@plotly/d3":20}],147:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/cartesian/axes":346,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../fx":198,"./draw_arrow_head":148,"@plotly/d3":20}],148:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -29932,7 +29949,7 @@ module.exports = function drawArrowHead(el3, ends, options) {
if(doEnd) drawhead(headStyle, end, endRot, scale);
};
-},{"../../lib":287,"../color":157,"./arrow_paths":139,"@plotly/d3":20}],148:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"./arrow_paths":140,"@plotly/d3":20}],149:[function(_dereq_,module,exports){
'use strict';
var drawModule = _dereq_('./draw');
@@ -29957,7 +29974,7 @@ module.exports = {
convertCoords: _dereq_('./convert_coords')
};
-},{"../../plots/cartesian/include_components":347,"./attributes":140,"./calc_autorange":141,"./click":142,"./convert_coords":144,"./defaults":145,"./draw":146}],149:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/include_components":357,"./attributes":141,"./calc_autorange":142,"./click":143,"./convert_coords":145,"./defaults":146,"./draw":147}],150:[function(_dereq_,module,exports){
'use strict';
var annAttrs = _dereq_('../annotations/attributes');
@@ -30026,7 +30043,7 @@ module.exports = overrideAll(templatedArray('annotation', {
// zref: 'z'
}), 'calc', 'from-root');
-},{"../../plot_api/edit_types":316,"../../plot_api/plot_template":323,"../annotations/attributes":140}],150:[function(_dereq_,module,exports){
+},{"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../annotations/attributes":141}],151:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -30083,7 +30100,7 @@ function mockAnnAxes(ann, scene) {
};
}
-},{"../../lib":287,"../../plots/cartesian/axes":334}],151:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346}],152:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -30151,7 +30168,7 @@ function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"../annotations/common_defaults":143,"./attributes":149}],152:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"../annotations/common_defaults":144,"./attributes":150}],153:[function(_dereq_,module,exports){
'use strict';
var drawRaw = _dereq_('../annotations/draw').drawRaw;
@@ -30195,7 +30212,7 @@ module.exports = function draw(scene) {
}
};
-},{"../../plots/gl3d/project":368,"../annotations/draw":146}],153:[function(_dereq_,module,exports){
+},{"../../plots/gl3d/project":377,"../annotations/draw":147}],154:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -30235,7 +30252,7 @@ function includeGL3D(layoutIn, layoutOut) {
}
}
-},{"../../lib":287,"../../registry":378,"./attributes":149,"./convert":150,"./defaults":151,"./draw":152}],154:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./attributes":150,"./convert":151,"./defaults":152,"./draw":153}],155:[function(_dereq_,module,exports){
'use strict';
// a trimmed down version of:
@@ -30260,7 +30277,7 @@ _dereq_('world-calendars/dist/calendars/taiwan');
_dereq_('world-calendars/dist/calendars/thai');
_dereq_('world-calendars/dist/calendars/ummalqura');
-},{"world-calendars/dist/calendars/chinese":123,"world-calendars/dist/calendars/coptic":124,"world-calendars/dist/calendars/discworld":125,"world-calendars/dist/calendars/ethiopian":126,"world-calendars/dist/calendars/hebrew":127,"world-calendars/dist/calendars/islamic":128,"world-calendars/dist/calendars/julian":129,"world-calendars/dist/calendars/mayan":130,"world-calendars/dist/calendars/nanakshahi":131,"world-calendars/dist/calendars/nepali":132,"world-calendars/dist/calendars/persian":133,"world-calendars/dist/calendars/taiwan":134,"world-calendars/dist/calendars/thai":135,"world-calendars/dist/calendars/ummalqura":136,"world-calendars/dist/main":137,"world-calendars/dist/plus":138}],155:[function(_dereq_,module,exports){
+},{"world-calendars/dist/calendars/chinese":124,"world-calendars/dist/calendars/coptic":125,"world-calendars/dist/calendars/discworld":126,"world-calendars/dist/calendars/ethiopian":127,"world-calendars/dist/calendars/hebrew":128,"world-calendars/dist/calendars/islamic":129,"world-calendars/dist/calendars/julian":130,"world-calendars/dist/calendars/mayan":131,"world-calendars/dist/calendars/nanakshahi":132,"world-calendars/dist/calendars/nepali":133,"world-calendars/dist/calendars/persian":134,"world-calendars/dist/calendars/taiwan":135,"world-calendars/dist/calendars/thai":136,"world-calendars/dist/calendars/ummalqura":137,"world-calendars/dist/main":138,"world-calendars/dist/plus":139}],156:[function(_dereq_,module,exports){
'use strict';
var calendars = _dereq_('./calendars');
@@ -30526,7 +30543,7 @@ module.exports = {
worldCalFmt: worldCalFmt
};
-},{"../../constants/numerical":267,"../../lib":287,"./calendars":154}],156:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"./calendars":155}],157:[function(_dereq_,module,exports){
'use strict';
@@ -30558,7 +30575,7 @@ exports.borderLine = '#BEC8D9';
// gives back exactly lightLine if the other colors are defaults.
exports.lightFraction = 100 * (0xe - 0x4) / (0xf - 0x4);
-},{}],157:[function(_dereq_,module,exports){
+},{}],158:[function(_dereq_,module,exports){
'use strict';
var tinycolor = _dereq_('tinycolor2');
@@ -30724,7 +30741,7 @@ function cleanOne(val) {
return 'rgb(' + rgbStr + ')';
}
-},{"../../lib/array":273,"./attributes":156,"fast-isnumeric":33,"tinycolor2":121}],158:[function(_dereq_,module,exports){
+},{"../../lib/array":285,"./attributes":157,"fast-isnumeric":33,"tinycolor2":122}],159:[function(_dereq_,module,exports){
'use strict';
var axesAttrs = _dereq_('../../plots/cartesian/layout_attributes');
@@ -30871,7 +30888,7 @@ module.exports = overrideAll({
}
}, 'colorbars', 'from-root');
-},{"../../lib/extend":281,"../../plot_api/edit_types":316,"../../plots/cartesian/layout_attributes":349,"../../plots/font_attributes":365}],159:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plots/cartesian/layout_attributes":359,"../../plots/font_attributes":374}],160:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -30891,7 +30908,7 @@ module.exports = {
}
};
-},{}],160:[function(_dereq_,module,exports){
+},{}],161:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -30985,7 +31002,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) {
coerce('title.side', isVertical ? 'top' : 'right');
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/cartesian/prefix_suffix_defaults":353,"../../plots/cartesian/tick_label_defaults":358,"../../plots/cartesian/tick_mark_defaults":359,"../../plots/cartesian/tick_value_defaults":360,"./attributes":158}],161:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/cartesian/prefix_suffix_defaults":363,"../../plots/cartesian/tick_label_defaults":367,"../../plots/cartesian/tick_mark_defaults":368,"../../plots/cartesian/tick_value_defaults":369,"./attributes":159}],162:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -31970,7 +31987,7 @@ module.exports = {
draw: draw
};
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/extend":281,"../../lib/setcursor":307,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../plots/cartesian/axis_defaults":336,"../../plots/cartesian/layout_attributes":349,"../../plots/cartesian/position_defaults":352,"../../plots/plots":371,"../../registry":378,"../color":157,"../colorscale/helpers":168,"../dragelement":176,"../drawing":179,"../titles":255,"./constants":159,"@plotly/d3":20,"tinycolor2":121}],162:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/extend":293,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../plots/cartesian/axis_defaults":348,"../../plots/cartesian/layout_attributes":359,"../../plots/cartesian/position_defaults":362,"../../plots/plots":380,"../../registry":387,"../color":158,"../colorscale/helpers":169,"../dragelement":177,"../drawing":180,"../titles":267,"./constants":160,"@plotly/d3":20,"tinycolor2":122}],163:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -31980,7 +31997,7 @@ module.exports = function hasColorbar(container) {
return Lib.isPlainObject(container.colorbar);
};
-},{"../../lib":287}],163:[function(_dereq_,module,exports){
+},{"../../lib":299}],164:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -31994,7 +32011,7 @@ module.exports = {
hasColorbar: _dereq_('./has_colorbar')
};
-},{"./attributes":158,"./defaults":160,"./draw":161,"./has_colorbar":162}],164:[function(_dereq_,module,exports){
+},{"./attributes":159,"./defaults":161,"./draw":162,"./has_colorbar":163}],165:[function(_dereq_,module,exports){
'use strict';
var colorbarAttrs = _dereq_('../colorbar/attributes');
@@ -32175,7 +32192,7 @@ module.exports = function colorScaleAttrs(context, opts) {
return attrs;
};
-},{"../../lib/regex":303,"../../lib/sort_object_keys":308,"../colorbar/attributes":158,"./scales.js":172}],165:[function(_dereq_,module,exports){
+},{"../../lib/regex":315,"../../lib/sort_object_keys":320,"../colorbar/attributes":159,"./scales.js":173}],166:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -32246,7 +32263,7 @@ module.exports = function calc(gd, trace, opts) {
}
};
-},{"../../lib":287,"./helpers":168,"fast-isnumeric":33}],166:[function(_dereq_,module,exports){
+},{"../../lib":299,"./helpers":169,"fast-isnumeric":33}],167:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -32315,7 +32332,7 @@ module.exports = function crossTraceDefaults(fullData, fullLayout) {
}
};
-},{"../../lib":287,"./helpers":168}],167:[function(_dereq_,module,exports){
+},{"../../lib":299,"./helpers":169}],168:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -32432,7 +32449,7 @@ module.exports = function colorScaleDefaults(parentContIn, parentContOut, layout
}
};
-},{"../../lib":287,"../../registry":378,"../colorbar/defaults":160,"../colorbar/has_colorbar":162,"./scales":172,"fast-isnumeric":33}],168:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"../colorbar/defaults":161,"../colorbar/has_colorbar":163,"./scales":173,"fast-isnumeric":33}],169:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -32664,7 +32681,7 @@ module.exports = {
makeColorScaleFuncFromTrace: makeColorScaleFuncFromTrace
};
-},{"../../lib":287,"../color":157,"./scales":172,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],169:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"./scales":173,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":122}],170:[function(_dereq_,module,exports){
'use strict';
var scales = _dereq_('./scales');
@@ -32698,7 +32715,7 @@ module.exports = {
makeColorScaleFuncFromTrace: helpers.makeColorScaleFuncFromTrace
};
-},{"./attributes":164,"./calc":165,"./cross_trace_defaults":166,"./defaults":167,"./helpers":168,"./layout_attributes":170,"./layout_defaults":171,"./scales":172}],170:[function(_dereq_,module,exports){
+},{"./attributes":165,"./calc":166,"./cross_trace_defaults":167,"./defaults":168,"./helpers":169,"./layout_attributes":171,"./layout_defaults":172,"./scales":173}],171:[function(_dereq_,module,exports){
'use strict';
var extendFlat = _dereq_('../../lib/extend').extendFlat;
@@ -32744,7 +32761,7 @@ module.exports = {
}))
};
-},{"../../lib/extend":281,"./attributes":164,"./scales":172}],171:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"./attributes":165,"./scales":173}],172:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -32787,7 +32804,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
}
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"./defaults":167,"./layout_attributes":170}],172:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"./defaults":168,"./layout_attributes":171}],173:[function(_dereq_,module,exports){
'use strict';
var tinycolor = _dereq_('tinycolor2');
@@ -32983,7 +33000,7 @@ module.exports = {
isValid: isValidScale
};
-},{"tinycolor2":121}],173:[function(_dereq_,module,exports){
+},{"tinycolor2":122}],174:[function(_dereq_,module,exports){
'use strict';
@@ -33007,7 +33024,7 @@ module.exports = function align(v, dv, v0, v1, anchor) {
return vc;
};
-},{}],174:[function(_dereq_,module,exports){
+},{}],175:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -33036,7 +33053,7 @@ module.exports = function getCursor(x, y, xanchor, yanchor) {
return cursorset[y][x];
};
-},{"../../lib":287}],175:[function(_dereq_,module,exports){
+},{"../../lib":299}],176:[function(_dereq_,module,exports){
'use strict';
exports.selectMode = function(dragmode) {
@@ -33087,7 +33104,7 @@ exports.selectingOrDrawing = function(dragmode) {
);
};
-},{}],176:[function(_dereq_,module,exports){
+},{}],177:[function(_dereq_,module,exports){
'use strict';
var mouseOffset = _dereq_('mouse-event-offset');
@@ -33371,7 +33388,7 @@ function pointerOffset(e) {
);
}
-},{"../../lib":287,"../../plots/cartesian/constants":341,"./align":173,"./cursor":174,"./unhover":177,"has-hover":64,"has-passive-events":65,"mouse-event-offset":71}],177:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/constants":353,"./align":174,"./cursor":175,"./unhover":178,"has-hover":64,"has-passive-events":65,"mouse-event-offset":71}],178:[function(_dereq_,module,exports){
'use strict';
var Events = _dereq_('../../lib/events');
@@ -33418,7 +33435,7 @@ unhover.raw = function raw(gd, evt) {
}
};
-},{"../../lib/dom":279,"../../lib/events":280,"../../lib/throttle":311,"../fx/constants":191}],178:[function(_dereq_,module,exports){
+},{"../../lib/dom":291,"../../lib/events":292,"../../lib/throttle":323,"../fx/constants":192}],179:[function(_dereq_,module,exports){
'use strict';
exports.dash = {
@@ -33480,7 +33497,7 @@ exports.pattern = {
editType: 'style',
};
-},{}],179:[function(_dereq_,module,exports){
+},{}],180:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -34931,7 +34948,7 @@ drawing.setTextPointsScale = function(selection, xScale, yScale) {
});
};
-},{"../../components/fx/helpers":193,"../../constants/alignment":262,"../../constants/interactions":266,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../lib/svg_text_utils":310,"../../registry":378,"../../traces/scatter/make_bubble_size_func":517,"../../traces/scatter/subtypes":525,"../color":157,"../colorscale":169,"./symbol_defs":180,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],180:[function(_dereq_,module,exports){
+},{"../../components/fx/helpers":194,"../../constants/alignment":274,"../../constants/interactions":278,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../lib/svg_text_utils":322,"../../registry":387,"../../traces/scatter/make_bubble_size_func":526,"../../traces/scatter/subtypes":534,"../color":158,"../colorscale":170,"./symbol_defs":181,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":122}],181:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -35486,7 +35503,7 @@ module.exports = {
}
};
-},{"@plotly/d3":20}],181:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],182:[function(_dereq_,module,exports){
'use strict';
@@ -35569,7 +35586,7 @@ module.exports = {
}
};
-},{}],182:[function(_dereq_,module,exports){
+},{}],183:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -35647,7 +35664,7 @@ function calcOneAxis(calcTrace, trace, axis, coord) {
baseExtremes.max = baseExtremes.max.concat(extremes.max);
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"./compute_error":183,"fast-isnumeric":33}],183:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./compute_error":184,"fast-isnumeric":33}],184:[function(_dereq_,module,exports){
'use strict';
@@ -35739,7 +35756,7 @@ function makeComputeErrorValue(type, value) {
}
}
-},{}],184:[function(_dereq_,module,exports){
+},{}],185:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -35806,7 +35823,7 @@ module.exports = function(traceIn, traceOut, defaultColor, opts) {
}
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378,"./attributes":181,"fast-isnumeric":33}],185:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"./attributes":182,"fast-isnumeric":33}],186:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -35867,7 +35884,7 @@ function hoverInfo(calcPoint, trace, hoverPoint) {
}
}
-},{"../../lib":287,"../../plot_api/edit_types":316,"./attributes":181,"./calc":182,"./compute_error":183,"./defaults":184,"./plot":186,"./style":187}],186:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/edit_types":328,"./attributes":182,"./calc":183,"./compute_error":184,"./defaults":185,"./plot":187,"./style":188}],187:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -36030,7 +36047,7 @@ function errorCoords(d, xa, ya) {
return out;
}
-},{"../../traces/scatter/subtypes":525,"../drawing":179,"@plotly/d3":20,"fast-isnumeric":33}],187:[function(_dereq_,module,exports){
+},{"../../traces/scatter/subtypes":534,"../drawing":180,"@plotly/d3":20,"fast-isnumeric":33}],188:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -36058,7 +36075,7 @@ module.exports = function style(traces) {
});
};
-},{"../color":157,"@plotly/d3":20}],188:[function(_dereq_,module,exports){
+},{"../color":158,"@plotly/d3":20}],189:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -36083,7 +36100,7 @@ module.exports = {
}
};
-},{"../../lib/extend":281,"../../plots/font_attributes":365,"./layout_attributes":198}],189:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/font_attributes":374,"./layout_attributes":199}],190:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -36134,7 +36151,7 @@ function paste(traceAttr, cd, cdAttr, fn) {
}
}
-},{"../../lib":287,"../../registry":378}],190:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],191:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -36163,7 +36180,7 @@ module.exports = function click(gd, evt, subplot) {
}
};
-},{"../../registry":378,"./hover":194}],191:[function(_dereq_,module,exports){
+},{"../../registry":387,"./hover":195}],192:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -36187,7 +36204,7 @@ module.exports = {
HOVERID: '-hover'
};
-},{}],192:[function(_dereq_,module,exports){
+},{}],193:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -36205,7 +36222,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
handleHoverLabelDefaults(traceIn, traceOut, coerce, opts);
};
-},{"../../lib":287,"./attributes":188,"./hoverlabel_defaults":195}],193:[function(_dereq_,module,exports){
+},{"../../lib":299,"./attributes":189,"./hoverlabel_defaults":196}],194:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -36459,7 +36476,7 @@ exports.isXYhover = function(hovermode) {
return !!xyHoverMode[hovermode];
};
-},{"../../lib":287}],194:[function(_dereq_,module,exports){
+},{"../../lib":299}],195:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -38601,7 +38618,7 @@ function getBoundingClientRect(gd, node) {
};
}
-},{"../../lib":287,"../../lib/events":280,"../../lib/override_cursor":298,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"../legend/defaults":209,"../legend/draw":210,"./constants":191,"./helpers":193,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],195:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/events":292,"../../lib/override_cursor":310,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../legend/defaults":210,"../legend/draw":211,"./constants":192,"./helpers":194,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":122}],196:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38641,7 +38658,7 @@ module.exports = function handleHoverLabelDefaults(contIn, contOut, coerce, opts
coerce('hoverlabel.align', opts.align);
};
-},{"../../lib":287,"../color":157,"./helpers":193}],196:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"./helpers":194}],197:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38659,7 +38676,7 @@ module.exports = function handleHoverModeDefaults(layoutIn, layoutOut) {
return coerce('hovermode');
};
-},{"../../lib":287,"./layout_attributes":198}],197:[function(_dereq_,module,exports){
+},{"../../lib":299,"./layout_attributes":199}],198:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -38730,7 +38747,7 @@ function castHoverinfo(trace, fullLayout, ptNumber) {
return Lib.castOption(trace, ptNumber, 'hoverinfo', _coerce);
}
-},{"../../lib":287,"../dragelement":176,"./attributes":188,"./calc":189,"./click":190,"./constants":191,"./defaults":192,"./helpers":193,"./hover":194,"./layout_attributes":198,"./layout_defaults":199,"./layout_global_defaults":200,"@plotly/d3":20}],198:[function(_dereq_,module,exports){
+},{"../../lib":299,"../dragelement":177,"./attributes":189,"./calc":190,"./click":191,"./constants":192,"./defaults":193,"./helpers":194,"./hover":195,"./layout_attributes":199,"./layout_defaults":200,"./layout_global_defaults":201,"@plotly/d3":20}],199:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -38824,7 +38841,7 @@ module.exports = {
}
};
-},{"../../plots/font_attributes":365,"./constants":191}],199:[function(_dereq_,module,exports){
+},{"../../plots/font_attributes":374,"./constants":192}],200:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38865,7 +38882,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
Lib.coerceFont(coerce, 'hoverlabel.grouptitlefont', layoutOut.hoverlabel.font);
};
-},{"../../lib":287,"./hoverlabel_defaults":195,"./hovermode_defaults":196,"./layout_attributes":198}],200:[function(_dereq_,module,exports){
+},{"../../lib":299,"./hoverlabel_defaults":196,"./hovermode_defaults":197,"./layout_attributes":199}],201:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -38880,7 +38897,7 @@ module.exports = function supplyLayoutGlobalDefaults(layoutIn, layoutOut) {
handleHoverLabelDefaults(layoutIn, layoutOut, coerce);
};
-},{"../../lib":287,"./hoverlabel_defaults":195,"./layout_attributes":198}],201:[function(_dereq_,module,exports){
+},{"../../lib":299,"./hoverlabel_defaults":196,"./layout_attributes":199}],202:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -39223,7 +39240,7 @@ module.exports = {
contentDefaults: contentDefaults
};
-},{"../../lib":287,"../../lib/regex":303,"../../plot_api/plot_template":323,"../../plots/cartesian/constants":341,"../../plots/domain":364}],202:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/regex":315,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353,"../../plots/domain":373}],203:[function(_dereq_,module,exports){
'use strict';
var cartesianConstants = _dereq_('../../plots/cartesian/constants');
@@ -39325,7 +39342,7 @@ module.exports = templatedArray('image', {
editType: 'arraydraw'
});
-},{"../../constants/axis_placeable_objects":263,"../../plot_api/plot_template":323,"../../plots/cartesian/constants":341}],203:[function(_dereq_,module,exports){
+},{"../../constants/axis_placeable_objects":275,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353}],204:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -39397,7 +39414,7 @@ module.exports = function convertCoords(gd, ax, newType, doExtra) {
}
};
-},{"../../lib/to_log_range":312,"fast-isnumeric":33}],204:[function(_dereq_,module,exports){
+},{"../../lib/to_log_range":324,"fast-isnumeric":33}],205:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -39454,7 +39471,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) {
return imageOut;
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"./attributes":202}],205:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":203}],206:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -39704,7 +39721,7 @@ module.exports = function draw(gd) {
}
};
-},{"../../constants/xmlns_namespaces":268,"../../plots/cartesian/axes":334,"../../plots/cartesian/axis_ids":338,"../drawing":179,"@plotly/d3":20}],206:[function(_dereq_,module,exports){
+},{"../../constants/xmlns_namespaces":280,"../../plots/cartesian/axes":346,"../../plots/cartesian/axis_ids":350,"../drawing":180,"@plotly/d3":20}],207:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -39720,7 +39737,7 @@ module.exports = {
convertCoords: _dereq_('./convert_coords')
};
-},{"../../plots/cartesian/include_components":347,"./attributes":202,"./convert_coords":203,"./defaults":204,"./draw":205}],207:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/include_components":357,"./attributes":203,"./convert_coords":204,"./defaults":205,"./draw":206}],208:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -39849,7 +39866,7 @@ module.exports = {
editType: 'legend'
};
-},{"../../plots/font_attributes":365,"../color/attributes":156}],208:[function(_dereq_,module,exports){
+},{"../../plots/font_attributes":374,"../color/attributes":157}],209:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -39865,7 +39882,7 @@ module.exports = {
itemGap: 5
};
-},{}],209:[function(_dereq_,module,exports){
+},{}],210:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -40015,7 +40032,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
}
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/attributes":330,"../../plots/layout_attributes":369,"../../registry":378,"./attributes":207,"./helpers":213}],210:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/attributes":342,"../../plots/layout_attributes":378,"../../registry":387,"./attributes":208,"./helpers":214}],211:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -40854,7 +40871,7 @@ function getYanchor(legendObj) {
'top';
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/events":280,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"./constants":208,"./get_legend_data":211,"./handle_click":212,"./helpers":213,"./style":215,"@plotly/d3":20}],211:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/events":292,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"./constants":209,"./get_legend_data":212,"./handle_click":213,"./helpers":214,"./style":216,"@plotly/d3":20}],212:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -41030,7 +41047,7 @@ module.exports = function getLegendData(calcdata, opts) {
return legendData;
};
-},{"../../registry":378,"./helpers":213}],212:[function(_dereq_,module,exports){
+},{"../../registry":387,"./helpers":214}],213:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -41272,7 +41289,7 @@ module.exports = function handleClick(g, gd, numClicks) {
}
};
-},{"../../lib":287,"../../registry":378}],213:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],214:[function(_dereq_,module,exports){
'use strict';
exports.isGrouped = function isGrouped(legendLayout) {
@@ -41287,7 +41304,7 @@ exports.isReversed = function isReversed(legendLayout) {
return (legendLayout.traceorder || '').indexOf('reversed') !== -1;
};
-},{}],214:[function(_dereq_,module,exports){
+},{}],215:[function(_dereq_,module,exports){
'use strict';
@@ -41302,7 +41319,7 @@ module.exports = {
style: _dereq_('./style')
};
-},{"./attributes":207,"./defaults":209,"./draw":210,"./style":215}],215:[function(_dereq_,module,exports){
+},{"./attributes":208,"./defaults":210,"./draw":211,"./style":216}],216:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -41993,7 +42010,7 @@ function dimAttr(v, dflt, max) {
return v;
}
-},{"../../lib":287,"../../registry":378,"../../traces/pie/helpers":492,"../../traces/pie/style_one":498,"../../traces/scatter/subtypes":525,"../color":157,"../colorscale/helpers":168,"../drawing":179,"./constants":208,"@plotly/d3":20}],216:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"../../traces/pie/helpers":501,"../../traces/pie/style_one":507,"../../traces/scatter/subtypes":534,"../color":158,"../colorscale/helpers":169,"../drawing":180,"./constants":209,"@plotly/d3":20}],217:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -42037,7 +42054,7 @@ module.exports = {
}
};
-},{"./constants":218}],217:[function(_dereq_,module,exports){
+},{"./constants":219}],218:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -42789,7 +42806,7 @@ function resetView(gd, subplotType) {
Registry.call('_guiRelayout', gd, aObj);
}
-},{"../../fonts/ploticon":270,"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../plots/plots":371,"../../registry":378,"../shapes/draw":241}],218:[function(_dereq_,module,exports){
+},{"../../fonts/ploticon":282,"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../shapes/draw":253}],219:[function(_dereq_,module,exports){
'use strict';
var modeBarButtons = _dereq_('./buttons');
@@ -42832,7 +42849,7 @@ module.exports = {
foreButtons: foreButtons
};
-},{"./buttons":217}],219:[function(_dereq_,module,exports){
+},{"./buttons":218}],220:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -42858,7 +42875,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
coerce('remove');
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../color":157,"./attributes":216}],220:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../color":158,"./attributes":217}],221:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -42871,7 +42888,7 @@ module.exports = {
manage: _dereq_('./manage')
};
-},{"./attributes":216,"./defaults":219,"./manage":221}],221:[function(_dereq_,module,exports){
+},{"./attributes":217,"./defaults":220,"./manage":222}],222:[function(_dereq_,module,exports){
'use strict';
var axisIds = _dereq_('../../plots/cartesian/axis_ids');
@@ -43230,7 +43247,7 @@ function fillCustomButton(originalModeBarButtons) {
return customButtons;
}
-},{"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../registry":378,"../../traces/scatter/subtypes":525,"../fx/helpers":193,"./buttons":217,"./constants":218,"./modebar":222}],222:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../registry":387,"../../traces/scatter/subtypes":534,"../fx/helpers":194,"./buttons":218,"./constants":219,"./modebar":223}],223:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -43573,7 +43590,7 @@ function createModeBar(gd, buttons) {
module.exports = createModeBar;
-},{"../../fonts/ploticon":270,"../../lib":287,"../../version":552,"@plotly/d3":20,"fast-isnumeric":33}],223:[function(_dereq_,module,exports){
+},{"../../fonts/ploticon":282,"../../lib":299,"../../version":561,"@plotly/d3":20,"fast-isnumeric":33}],224:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -43671,7 +43688,7 @@ module.exports = {
editType: 'plot'
};
-},{"../../plot_api/plot_template":323,"../../plots/font_attributes":365,"../color/attributes":156}],224:[function(_dereq_,module,exports){
+},{"../../plot_api/plot_template":335,"../../plots/font_attributes":374,"../color/attributes":157}],225:[function(_dereq_,module,exports){
'use strict';
@@ -43692,7 +43709,7 @@ module.exports = {
darkAmount: 10
};
-},{}],225:[function(_dereq_,module,exports){
+},{}],226:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -43776,7 +43793,7 @@ function getPosDflt(containerOut, layout, counterAxes) {
return [containerOut.domain[0], posY + constants.yPad];
}
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/array_container_defaults":329,"../color":157,"./attributes":223,"./constants":224}],226:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/array_container_defaults":341,"../color":158,"./attributes":224,"./constants":225}],227:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -44023,7 +44040,7 @@ function reposition(gd, buttons, opts, axName, selector) {
selector.attr('transform', strTranslate(lx, ly));
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axis_ids":338,"../../plots/plots":371,"../../registry":378,"../color":157,"../drawing":179,"./constants":224,"./get_update_object":227,"@plotly/d3":20}],227:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../color":158,"../drawing":180,"./constants":225,"./get_update_object":228,"@plotly/d3":20}],228:[function(_dereq_,module,exports){
'use strict';
var d3Time = _dereq_('d3-time');
@@ -44072,7 +44089,7 @@ function getXRange(axisLayout, buttonLayout) {
return [range0, range1];
}
-},{"../../lib":287,"d3-time":32}],228:[function(_dereq_,module,exports){
+},{"../../lib":299,"d3-time":32}],229:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -44091,7 +44108,7 @@ module.exports = {
draw: _dereq_('./draw')
};
-},{"./attributes":223,"./defaults":225,"./draw":226}],229:[function(_dereq_,module,exports){
+},{"./attributes":224,"./defaults":226,"./draw":227}],230:[function(_dereq_,module,exports){
'use strict';
var colorAttributes = _dereq_('../color/attributes');
@@ -44143,7 +44160,7 @@ module.exports = {
editType: 'calc'
};
-},{"../color/attributes":156}],230:[function(_dereq_,module,exports){
+},{"../color/attributes":157}],231:[function(_dereq_,module,exports){
'use strict';
var listAxes = _dereq_('../../plots/cartesian/axis_ids').list;
@@ -44169,7 +44186,7 @@ module.exports = function calcAutorange(gd) {
}
};
-},{"../../plots/cartesian/autorange":333,"../../plots/cartesian/axis_ids":338,"./constants":231}],231:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/autorange":345,"../../plots/cartesian/axis_ids":350,"./constants":232}],232:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -44217,7 +44234,7 @@ module.exports = {
extraPad: 15
};
-},{}],232:[function(_dereq_,module,exports){
+},{}],233:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -44295,7 +44312,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) {
containerOut._input = containerIn;
};
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/cartesian/axis_ids":338,"./attributes":229,"./oppaxis_attributes":236}],233:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/cartesian/axis_ids":350,"./attributes":230,"./oppaxis_attributes":237}],234:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -44931,7 +44948,7 @@ function drawGrabbers(rangeSlider, gd, axisOpts, opts) {
grabAreaMax.attr('height', opts._height);
}
-},{"../../lib":287,"../../lib/setcursor":307,"../../plots/cartesian":348,"../../plots/cartesian/axis_ids":338,"../../plots/plots":371,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"../titles":255,"./constants":231,"@plotly/d3":20}],234:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/setcursor":319,"../../plots/cartesian":358,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../titles":267,"./constants":232,"@plotly/d3":20}],235:[function(_dereq_,module,exports){
'use strict';
var axisIDs = _dereq_('../../plots/cartesian/axis_ids');
@@ -44998,7 +45015,7 @@ exports.autoMarginOpts = function(gd, ax) {
};
};
-},{"../../constants/alignment":262,"../../lib/svg_text_utils":310,"../../plots/cartesian/axis_ids":338,"./constants":231}],235:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib/svg_text_utils":322,"../../plots/cartesian/axis_ids":350,"./constants":232}],236:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -45029,7 +45046,7 @@ module.exports = {
autoMarginOpts: helpers.autoMarginOpts
};
-},{"../../lib":287,"./attributes":229,"./calc_autorange":230,"./defaults":232,"./draw":233,"./helpers":234,"./oppaxis_attributes":236}],236:[function(_dereq_,module,exports){
+},{"../../lib":299,"./attributes":230,"./calc_autorange":231,"./defaults":233,"./draw":234,"./helpers":235,"./oppaxis_attributes":237}],237:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -45055,7 +45072,2195 @@ module.exports = {
editType: 'calc'
};
-},{}],237:[function(_dereq_,module,exports){
+},{}],238:[function(_dereq_,module,exports){
+'use strict';
+
+var annAttrs = _dereq_('../annotations/attributes');
+var scatterLineAttrs = _dereq_('../../traces/scatter/attributes').line;
+var dash = _dereq_('../drawing/attributes').dash;
+var extendFlat = _dereq_('../../lib/extend').extendFlat;
+var overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;
+var templatedArray = _dereq_('../../plot_api/plot_template').templatedArray;
+var axisPlaceableObjs = _dereq_('../../constants/axis_placeable_objects');
+
+module.exports = overrideAll(templatedArray('selection', {
+ type: {
+ valType: 'enumerated',
+ values: ['rect', 'path'],
+ },
+
+ xref: extendFlat({}, annAttrs.xref, {
+ }),
+
+ yref: extendFlat({}, annAttrs.yref, {
+ }),
+
+ x0: {
+ valType: 'any',
+ },
+ x1: {
+ valType: 'any',
+ },
+
+ y0: {
+ valType: 'any',
+ },
+ y1: {
+ valType: 'any',
+ },
+
+ path: {
+ valType: 'string',
+ editType: 'arraydraw',
+ },
+
+ opacity: {
+ valType: 'number',
+ min: 0,
+ max: 1,
+ dflt: 0.7,
+ editType: 'arraydraw',
+ },
+
+ line: {
+ color: scatterLineAttrs.color,
+ width: extendFlat({}, scatterLineAttrs.width, {
+ min: 1,
+ dflt: 1
+ }),
+ dash: extendFlat({}, dash, {
+ dflt: 'dot'
+ })
+ },
+}), 'arraydraw', 'from-root');
+
+},{"../../constants/axis_placeable_objects":275,"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../traces/scatter/attributes":509,"../annotations/attributes":141,"../drawing/attributes":179}],239:[function(_dereq_,module,exports){
+'use strict';
+
+module.exports = {
+ // max pixels off straight before a lasso select line counts as bent
+ BENDPX: 1.5,
+
+ // smallest dimension allowed for a select box
+ MINSELECT: 12,
+
+ // throttling limit (ms) for selectPoints calls
+ SELECTDELAY: 100,
+
+ // cache ID suffix for throttle
+ SELECTID: '-select',
+};
+
+},{}],240:[function(_dereq_,module,exports){
+'use strict';
+
+var Lib = _dereq_('../../lib');
+var Axes = _dereq_('../../plots/cartesian/axes');
+var handleArrayContainerDefaults = _dereq_('../../plots/array_container_defaults');
+
+var attributes = _dereq_('./attributes');
+var helpers = _dereq_('../shapes/helpers');
+
+module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
+ handleArrayContainerDefaults(layoutIn, layoutOut, {
+ name: 'selections',
+ handleItemDefaults: handleSelectionDefaults
+ });
+
+ // Drop rect selections with undefined x0, y0, x1, x1 values.
+ // In future we may accept partially defined rects e.g.
+ // a case with only x0 and x1 may be used to define
+ // [-Infinity, +Infinity] range on the y axis, etc.
+ var selections = layoutOut.selections;
+ for(var i = 0; i < selections.length; i++) {
+ var selection = selections[i];
+ if(!selection) continue;
+ if(selection.path === undefined) {
+ if(
+ selection.x0 === undefined ||
+ selection.x1 === undefined ||
+ selection.y0 === undefined ||
+ selection.y1 === undefined
+ ) {
+ layoutOut.selections[i] = null;
+ }
+ }
+ }
+};
+
+function handleSelectionDefaults(selectionIn, selectionOut, fullLayout) {
+ function coerce(attr, dflt) {
+ return Lib.coerce(selectionIn, selectionOut, attributes, attr, dflt);
+ }
+
+ var path = coerce('path');
+ var dfltType = path ? 'path' : 'rect';
+ var selectionType = coerce('type', dfltType);
+ var noPath = selectionType !== 'path';
+ if(noPath) delete selectionOut.path;
+
+ coerce('opacity');
+ coerce('line.color');
+ coerce('line.width');
+ coerce('line.dash');
+
+ // positioning
+ var axLetters = ['x', 'y'];
+ for(var i = 0; i < 2; i++) {
+ var axLetter = axLetters[i];
+ var gdMock = {_fullLayout: fullLayout};
+ var ax;
+ var pos2r;
+ var r2pos;
+
+ // xref, yref
+ var axRef = Axes.coerceRef(selectionIn, selectionOut, gdMock, axLetter);
+
+ // axRefType is 'range' for selections
+ ax = Axes.getFromId(gdMock, axRef);
+ ax._selectionIndices.push(selectionOut._index);
+ r2pos = helpers.rangeToShapePosition(ax);
+ pos2r = helpers.shapePositionToRange(ax);
+
+ // Coerce x0, x1, y0, y1
+ if(noPath) {
+ // hack until V3.0 when log has regular range behavior - make it look like other
+ // ranges to send to coerce, then put it back after
+ // this is all to give reasonable default position behavior on log axes, which is
+ // a pretty unimportant edge case so we could just ignore this.
+ var attr0 = axLetter + '0';
+ var attr1 = axLetter + '1';
+ var in0 = selectionIn[attr0];
+ var in1 = selectionIn[attr1];
+ selectionIn[attr0] = pos2r(selectionIn[attr0], true);
+ selectionIn[attr1] = pos2r(selectionIn[attr1], true);
+
+ Axes.coercePosition(selectionOut, gdMock, coerce, axRef, attr0);
+ Axes.coercePosition(selectionOut, gdMock, coerce, axRef, attr1);
+
+ var p0 = selectionOut[attr0];
+ var p1 = selectionOut[attr1];
+
+ if(p0 !== undefined && p1 !== undefined) {
+ // hack part 2
+ selectionOut[attr0] = r2pos(p0);
+ selectionOut[attr1] = r2pos(p1);
+ selectionIn[attr0] = in0;
+ selectionIn[attr1] = in1;
+ }
+ }
+ }
+
+ if(noPath) {
+ Lib.noneOrAll(selectionIn, selectionOut, ['x0', 'x1', 'y0', 'y1']);
+ }
+}
+
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"../shapes/helpers":260,"./attributes":238}],241:[function(_dereq_,module,exports){
+'use strict';
+
+var readPaths = _dereq_('../shapes/draw_newshape/helpers').readPaths;
+var displayOutlines = _dereq_('../shapes/display_outlines');
+
+var clearOutlineControllers = _dereq_('../shapes/handle_outline').clearOutlineControllers;
+
+var Color = _dereq_('../color');
+var Drawing = _dereq_('../drawing');
+var arrayEditor = _dereq_('../../plot_api/plot_template').arrayEditor;
+
+var helpers = _dereq_('../shapes/helpers');
+var getPathString = helpers.getPathString;
+
+
+// Selections are stored in gd.layout.selections, an array of objects
+// index can point to one item in this array,
+// or non-numeric to simply add a new one
+// or -1 to modify all existing
+// opt can be the full options object, or one key (to be set to value)
+// or undefined to simply redraw
+// if opt is blank, val can be 'add' or a full options object to add a new
+// annotation at that point in the array, or 'remove' to delete this one
+
+module.exports = {
+ draw: draw,
+ drawOne: drawOne,
+ activateLastSelection: activateLastSelection
+};
+
+function draw(gd) {
+ var fullLayout = gd._fullLayout;
+
+ clearOutlineControllers(gd);
+
+ // Remove previous selections before drawing new selections in fullLayout.selections
+ fullLayout._selectionLayer.selectAll('path').remove();
+
+ for(var k in fullLayout._plots) {
+ var selectionLayer = fullLayout._plots[k].selectionLayer;
+ if(selectionLayer) selectionLayer.selectAll('path').remove();
+ }
+
+ for(var i = 0; i < fullLayout.selections.length; i++) {
+ drawOne(gd, i);
+ }
+}
+
+function drawOne(gd, index) {
+ // remove the existing selection if there is one.
+ // because indices can change, we need to look in all selection layers
+ gd._fullLayout._paperdiv
+ .selectAll('.selectionlayer [data-index="' + index + '"]')
+ .remove();
+
+ var o = helpers.makeSelectionsOptionsAndPlotinfo(gd, index);
+ var options = o.options;
+ var plotinfo = o.plotinfo;
+
+ // this selection is gone - quit now after deleting it
+ // TODO: use d3 idioms instead of deleting and redrawing every time
+ if(!options._input) return;
+
+ drawSelection(gd._fullLayout._selectionLayer);
+
+ function drawSelection(selectionLayer) {
+ var d = getPathString(gd, options);
+ var attrs = {
+ 'data-index': index,
+ 'fill-rule': 'evenodd',
+ d: d
+ };
+
+ var opacity = options.opacity;
+ var fillColor = 'rgba(0,0,0,0)';
+ var lineColor = options.line.color || Color.contrast(gd._fullLayout.plot_bgcolor);
+ var lineWidth = options.line.width;
+ var lineDash = options.line.dash;
+ if(!lineWidth) {
+ // ensure invisible border to activate the selection
+ lineWidth = 5;
+ lineDash = 'solid';
+ }
+
+ var isActiveSelection =
+ gd._fullLayout._activeSelectionIndex === index;
+
+ if(isActiveSelection) {
+ fillColor = gd._fullLayout.activeselection.fillcolor;
+ opacity = gd._fullLayout.activeselection.opacity;
+ }
+
+ var allPaths = [];
+ for(var sensory = 1; sensory >= 0; sensory--) {
+ var path = selectionLayer.append('path')
+ .attr(attrs)
+ .style('opacity', sensory ? 0.1 : opacity)
+ .call(Color.stroke, lineColor)
+ .call(Color.fill, fillColor)
+ // make it easier to select senory background path
+ .call(Drawing.dashLine,
+ sensory ? 'solid' : lineDash,
+ sensory ? 4 + lineWidth : lineWidth
+ );
+
+ setClipPath(path, gd, options);
+
+ if(isActiveSelection) {
+ var editHelpers = arrayEditor(gd.layout, 'selections', options);
+
+ path.style({
+ 'cursor': 'move',
+ });
+
+ var dragOptions = {
+ element: path.node(),
+ plotinfo: plotinfo,
+ gd: gd,
+ editHelpers: editHelpers,
+ isActiveSelection: true // i.e. to enable controllers
+ };
+
+ var polygons = readPaths(d, gd);
+ // display polygons on the screen
+ displayOutlines(polygons, path, dragOptions);
+ } else {
+ path.style('pointer-events', sensory ? 'all' : 'none');
+ }
+
+ allPaths[sensory] = path;
+ }
+
+ var forePath = allPaths[0];
+ var backPath = allPaths[1];
+
+ backPath.node().addEventListener('click', function() { return activateSelection(gd, forePath); });
+ }
+}
+
+function setClipPath(selectionPath, gd, selectionOptions) {
+ var clipAxes = selectionOptions.xref + selectionOptions.yref;
+
+ Drawing.setClipUrl(
+ selectionPath,
+ 'clip' + gd._fullLayout._uid + clipAxes,
+ gd
+ );
+}
+
+
+function activateSelection(gd, path) {
+ var element = path.node();
+ var id = +element.getAttribute('data-index');
+ if(id >= 0) {
+ // deactivate if already active
+ if(id === gd._fullLayout._activeSelectionIndex) {
+ deactivateSelection(gd);
+ return;
+ }
+
+ gd._fullLayout._activeSelectionIndex = id;
+ gd._fullLayout._deactivateSelection = deactivateSelection;
+ draw(gd);
+ }
+}
+
+function activateLastSelection(gd) {
+ var id = gd._fullLayout.selections.length - 1;
+ gd._fullLayout._activeSelectionIndex = id;
+ gd._fullLayout._deactivateSelection = deactivateSelection;
+ draw(gd);
+}
+
+function deactivateSelection(gd) {
+ var id = gd._fullLayout._activeSelectionIndex;
+ if(id >= 0) {
+ clearOutlineControllers(gd);
+ delete gd._fullLayout._activeSelectionIndex;
+ draw(gd);
+ }
+}
+
+},{"../../plot_api/plot_template":335,"../color":158,"../drawing":180,"../shapes/display_outlines":252,"../shapes/draw_newshape/helpers":257,"../shapes/handle_outline":259,"../shapes/helpers":260}],242:[function(_dereq_,module,exports){
+'use strict';
+
+var dash = _dereq_('../../drawing/attributes').dash;
+var extendFlat = _dereq_('../../../lib/extend').extendFlat;
+
+module.exports = {
+ newselection: {
+ mode: {
+ valType: 'enumerated',
+ values: ['immediate', 'gradual'],
+ dflt: 'immediate',
+ editType: 'none',
+ },
+
+ line: {
+ color: {
+ valType: 'color',
+ editType: 'none',
+ },
+ width: {
+ valType: 'number',
+ min: 1,
+ dflt: 1,
+ editType: 'none',
+ },
+ dash: extendFlat({}, dash, {
+ dflt: 'dot',
+ editType: 'none'
+ }),
+ editType: 'none'
+ },
+
+ // no drawdirection here noting that layout.selectdirection is used instead.
+
+ editType: 'none'
+ },
+
+ activeselection: {
+ fillcolor: {
+ valType: 'color',
+ dflt: 'rgba(0,0,0,0)',
+ editType: 'none',
+ },
+ opacity: {
+ valType: 'number',
+ min: 0,
+ max: 1,
+ dflt: 0.5,
+ editType: 'none',
+ },
+ editType: 'none'
+ }
+};
+
+},{"../../../lib/extend":293,"../../drawing/attributes":179}],243:[function(_dereq_,module,exports){
+'use strict';
+
+module.exports = function supplyDrawNewSelectionDefaults(layoutIn, layoutOut, coerce) {
+ coerce('newselection.mode');
+
+ var newselectionLineWidth = coerce('newselection.line.width');
+ if(newselectionLineWidth) {
+ coerce('newselection.line.color');
+ coerce('newselection.line.dash');
+ }
+
+ coerce('activeselection.fillcolor');
+ coerce('activeselection.opacity');
+};
+
+},{}],244:[function(_dereq_,module,exports){
+'use strict';
+
+var dragHelpers = _dereq_('../../dragelement/helpers');
+var selectMode = dragHelpers.selectMode;
+
+var handleOutline = _dereq_('../../shapes/handle_outline');
+var clearOutline = handleOutline.clearOutline;
+
+var helpers = _dereq_('../../shapes/draw_newshape/helpers');
+var readPaths = helpers.readPaths;
+var writePaths = helpers.writePaths;
+var fixDatesForPaths = helpers.fixDatesForPaths;
+
+module.exports = function newSelections(outlines, dragOptions) {
+ if(!outlines.length) return;
+ var e = outlines[0][0]; // pick first
+ if(!e) return;
+ var d = e.getAttribute('d');
+
+ var gd = dragOptions.gd;
+ var newStyle = gd._fullLayout.newselection;
+
+ var plotinfo = dragOptions.plotinfo;
+ var xaxis = plotinfo.xaxis;
+ var yaxis = plotinfo.yaxis;
+
+ var isActiveSelection = dragOptions.isActiveSelection;
+ var dragmode = dragOptions.dragmode;
+
+ var selections = (gd.layout || {}).selections || [];
+
+ if(!selectMode(dragmode) && isActiveSelection !== undefined) {
+ var id = gd._fullLayout._activeSelectionIndex;
+ if(id < selections.length) {
+ switch(gd._fullLayout.selections[id].type) {
+ case 'rect':
+ dragmode = 'select';
+ break;
+ case 'path':
+ dragmode = 'lasso';
+ break;
+ }
+ }
+ }
+
+ var polygons = readPaths(d, gd, plotinfo, isActiveSelection);
+
+ var newSelection = {
+ xref: xaxis._id,
+ yref: yaxis._id,
+
+ opacity: newStyle.opacity,
+ line: {
+ color: newStyle.line.color,
+ width: newStyle.line.width,
+ dash: newStyle.line.dash
+ }
+ };
+
+ var cell;
+ // rect can be in one cell
+ // only define cell if there is single cell
+ if(polygons.length === 1) cell = polygons[0];
+
+ if(
+ cell &&
+ cell.length === 5 && // ensure we only have 4 corners for a rect
+ dragmode === 'select'
+ ) {
+ newSelection.type = 'rect';
+ newSelection.x0 = cell[0][1];
+ newSelection.y0 = cell[0][2];
+ newSelection.x1 = cell[2][1];
+ newSelection.y1 = cell[2][2];
+ } else {
+ newSelection.type = 'path';
+ if(xaxis && yaxis) fixDatesForPaths(polygons, xaxis, yaxis);
+ newSelection.path = writePaths(polygons);
+ cell = null;
+ }
+
+ clearOutline(gd);
+
+ var editHelpers = dragOptions.editHelpers;
+ var modifyItem = (editHelpers || {}).modifyItem;
+
+ var allSelections = [];
+ for(var q = 0; q < selections.length; q++) {
+ var beforeEdit = gd._fullLayout.selections[q];
+ if(!beforeEdit) {
+ allSelections[q] = beforeEdit;
+ continue;
+ }
+
+ allSelections[q] = beforeEdit._input;
+
+ if(
+ isActiveSelection !== undefined &&
+ q === gd._fullLayout._activeSelectionIndex
+ ) {
+ var afterEdit = newSelection;
+
+ switch(beforeEdit.type) {
+ case 'rect':
+ modifyItem('x0', afterEdit.x0);
+ modifyItem('x1', afterEdit.x1);
+ modifyItem('y0', afterEdit.y0);
+ modifyItem('y1', afterEdit.y1);
+ break;
+
+ case 'path':
+ modifyItem('path', afterEdit.path);
+ break;
+ }
+ }
+ }
+
+ if(isActiveSelection === undefined) {
+ allSelections.push(newSelection); // add new selection
+ return allSelections;
+ }
+
+ return editHelpers ? editHelpers.getUpdateObj() : {};
+};
+
+},{"../../dragelement/helpers":176,"../../shapes/draw_newshape/helpers":257,"../../shapes/handle_outline":259}],245:[function(_dereq_,module,exports){
+'use strict';
+
+var strTranslate = _dereq_('../../lib').strTranslate;
+
+// in v3 (once log ranges are fixed),
+// we'll be able to p2r here for all axis types
+function p2r(ax, v) {
+ switch(ax.type) {
+ case 'log':
+ return ax.p2d(v);
+ case 'date':
+ return ax.p2r(v, 0, ax.calendar);
+ default:
+ return ax.p2r(v);
+ }
+}
+
+function r2p(ax, v) {
+ switch(ax.type) {
+ case 'log':
+ return ax.d2p(v);
+ case 'date':
+ return ax.r2p(v, 0, ax.calendar);
+ default:
+ return ax.r2p(v);
+ }
+}
+
+function axValue(ax) {
+ var index = (ax._id.charAt(0) === 'y') ? 1 : 0;
+ return function(v) { return p2r(ax, v[index]); };
+}
+
+function getTransform(plotinfo) {
+ return strTranslate(
+ plotinfo.xaxis._offset,
+ plotinfo.yaxis._offset
+ );
+}
+
+module.exports = {
+ p2r: p2r,
+ r2p: r2p,
+ axValue: axValue,
+ getTransform: getTransform
+};
+
+},{"../../lib":299}],246:[function(_dereq_,module,exports){
+'use strict';
+
+var drawModule = _dereq_('./draw');
+var select = _dereq_('./select');
+
+module.exports = {
+ moduleType: 'component',
+ name: 'selections',
+
+ layoutAttributes: _dereq_('./attributes'),
+ supplyLayoutDefaults: _dereq_('./defaults'),
+ supplyDrawNewSelectionDefaults: _dereq_('./draw_newselection/defaults'),
+ includeBasePlot: _dereq_('../../plots/cartesian/include_components')('selections'),
+
+ draw: drawModule.draw,
+ drawOne: drawModule.drawOne,
+
+ reselect: select.reselect,
+ prepSelect: select.prepSelect,
+ clearOutline: select.clearOutline,
+ clearSelectionsCache: select.clearSelectionsCache,
+ selectOnClick: select.selectOnClick
+};
+
+},{"../../plots/cartesian/include_components":357,"./attributes":238,"./defaults":240,"./draw":241,"./draw_newselection/defaults":243,"./select":247}],247:[function(_dereq_,module,exports){
+'use strict';
+
+var polybool = _dereq_('polybooljs');
+var pointInPolygon = _dereq_('point-in-polygon/nested'); // could we use contains lib/polygon instead?
+
+var Registry = _dereq_('../../registry');
+var dashStyle = _dereq_('../drawing').dashStyle;
+var Color = _dereq_('../color');
+var Fx = _dereq_('../fx');
+var makeEventData = _dereq_('../fx/helpers').makeEventData;
+var dragHelpers = _dereq_('../dragelement/helpers');
+var freeMode = dragHelpers.freeMode;
+var rectMode = dragHelpers.rectMode;
+var drawMode = dragHelpers.drawMode;
+var openMode = dragHelpers.openMode;
+var selectMode = dragHelpers.selectMode;
+
+var shapeHelpers = _dereq_('../shapes/helpers');
+var shapeConstants = _dereq_('../shapes/constants');
+
+var displayOutlines = _dereq_('../shapes/display_outlines');
+var clearOutline = _dereq_('../shapes/handle_outline').clearOutline;
+
+var newShapeHelpers = _dereq_('../shapes/draw_newshape/helpers');
+var handleEllipse = newShapeHelpers.handleEllipse;
+var readPaths = newShapeHelpers.readPaths;
+
+var newShapes = _dereq_('../shapes/draw_newshape/newshapes');
+
+var newSelections = _dereq_('./draw_newselection/newselections');
+var activateLastSelection = _dereq_('./draw').activateLastSelection;
+
+var Lib = _dereq_('../../lib');
+var ascending = Lib.sorterAsc;
+var libPolygon = _dereq_('../../lib/polygon');
+var throttle = _dereq_('../../lib/throttle');
+var getFromId = _dereq_('../../plots/cartesian/axis_ids').getFromId;
+var clearGlCanvases = _dereq_('../../lib/clear_gl_canvases');
+
+var redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;
+
+var constants = _dereq_('./constants');
+var MINSELECT = constants.MINSELECT;
+
+var filteredPolygon = libPolygon.filter;
+var polygonTester = libPolygon.tester;
+
+var helpers = _dereq_('./helpers');
+var p2r = helpers.p2r;
+var axValue = helpers.axValue;
+var getTransform = helpers.getTransform;
+
+function hasSubplot(dragOptions) {
+ // N.B. subplot may be falsy e.g zero sankey index!
+ return dragOptions.subplot !== undefined;
+}
+
+function prepSelect(evt, startX, startY, dragOptions, mode) {
+ var isCartesian = !hasSubplot(dragOptions);
+
+ var isFreeMode = freeMode(mode);
+ var isRectMode = rectMode(mode);
+ var isOpenMode = openMode(mode);
+ var isDrawMode = drawMode(mode);
+ var isSelectMode = selectMode(mode);
+
+ var isLine = mode === 'drawline';
+ var isEllipse = mode === 'drawcircle';
+ var isLineOrEllipse = isLine || isEllipse; // cases with two start & end positions
+
+ var gd = dragOptions.gd;
+ var fullLayout = gd._fullLayout;
+ var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
+ isCartesian; // N.B. only cartesian subplots have persistent selection
+
+ var zoomLayer = fullLayout._zoomlayer;
+ var dragBBox = dragOptions.element.getBoundingClientRect();
+ var plotinfo = dragOptions.plotinfo;
+ var transform = getTransform(plotinfo);
+ var x0 = startX - dragBBox.left;
+ var y0 = startY - dragBBox.top;
+
+ fullLayout._calcInverseTransform(gd);
+ var transformedCoords = Lib.apply3DTransform(fullLayout._invTransform)(x0, y0);
+ x0 = transformedCoords[0];
+ y0 = transformedCoords[1];
+ var scaleX = fullLayout._invScaleX;
+ var scaleY = fullLayout._invScaleY;
+
+ var x1 = x0;
+ var y1 = y0;
+ var path0 = 'M' + x0 + ',' + y0;
+ var xAxis = dragOptions.xaxes[0];
+ var yAxis = dragOptions.yaxes[0];
+ var pw = xAxis._length;
+ var ph = yAxis._length;
+
+ var subtract = evt.altKey &&
+ !(drawMode(mode) && isOpenMode);
+
+ var filterPoly, selectionTesters, mergedPolygons, currentPolygon;
+ var i, searchInfo, eventData;
+
+ coerceSelectionsCache(evt, gd, dragOptions);
+
+ if(isFreeMode) {
+ filterPoly = filteredPolygon([[x0, y0]], constants.BENDPX);
+ }
+
+ var outlines = zoomLayer.selectAll('path.select-outline-' + plotinfo.id).data([1]);
+ var newStyle = isDrawMode ?
+ fullLayout.newshape :
+ fullLayout.newselection;
+
+ outlines.enter()
+ .append('path')
+ .attr('class', 'select-outline select-outline-' + plotinfo.id)
+ .style({
+ opacity: isDrawMode ? newStyle.opacity / 2 : 1,
+ fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
+ stroke: newStyle.line.color || (
+ isCartesian ?
+ Color.contrast(gd._fullLayout.plot_bgcolor) :
+ '#7f7f7f' // non-cartesian subplot
+ ),
+ 'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
+ 'stroke-width': newStyle.line.width + 'px',
+ 'shape-rendering': 'crispEdges'
+ })
+ .attr('fill-rule', 'evenodd')
+ .classed('cursor-move', isDrawMode ? true : false)
+ .attr('transform', transform)
+ .attr('d', path0 + 'Z');
+
+ var corners = zoomLayer.append('path')
+ .attr('class', 'zoombox-corners')
+ .style({
+ fill: Color.background,
+ stroke: Color.defaultLine,
+ 'stroke-width': 1
+ })
+ .attr('transform', transform)
+ .attr('d', 'M0,0Z');
+
+
+ var throttleID = fullLayout._uid + constants.SELECTID;
+ var selection = [];
+
+ // find the traces to search for selection points
+ var searchTraces = determineSearchTraces(gd, dragOptions.xaxes,
+ dragOptions.yaxes, dragOptions.subplot);
+
+ if(immediateSelect && !evt.shiftKey) {
+ dragOptions._clearSubplotSelections = function() {
+ if(!isCartesian) return;
+
+ var xRef = xAxis._id;
+ var yRef = yAxis._id;
+ deselectSubplot(gd, xRef, yRef, searchTraces);
+
+ var selections = (gd.layout || {}).selections || [];
+ var list = [];
+ var selectionErased = false;
+ for(var q = 0; q < selections.length; q++) {
+ var s = fullLayout.selections[q];
+ if(
+ s.xref !== xRef ||
+ s.yref !== yRef
+ ) {
+ list.push(selections[q]);
+ } else {
+ selectionErased = true;
+ }
+ }
+
+ if(selectionErased) {
+ Registry.call('_guiRelayout', gd, {
+ selections: list
+ });
+ }
+ };
+ }
+
+ var fillRangeItems = getFillRangeItems(dragOptions);
+
+ dragOptions.moveFn = function(dx0, dy0) {
+ if(dragOptions._clearSubplotSelections) {
+ dragOptions._clearSubplotSelections();
+ dragOptions._clearSubplotSelections = undefined;
+ }
+
+ x1 = Math.max(0, Math.min(pw, scaleX * dx0 + x0));
+ y1 = Math.max(0, Math.min(ph, scaleY * dy0 + y0));
+
+ var dx = Math.abs(x1 - x0);
+ var dy = Math.abs(y1 - y0);
+
+ if(isRectMode) {
+ var direction;
+ var start, end;
+
+ if(isSelectMode) {
+ var q = fullLayout.selectdirection;
+
+ if(q === 'any') {
+ if(dy < Math.min(dx * 0.6, MINSELECT)) {
+ direction = 'h';
+ } else if(dx < Math.min(dy * 0.6, MINSELECT)) {
+ direction = 'v';
+ } else {
+ direction = 'd';
+ }
+ } else {
+ direction = q;
+ }
+
+ switch(direction) {
+ case 'h':
+ start = isEllipse ? ph / 2 : 0;
+ end = ph;
+ break;
+ case 'v':
+ start = isEllipse ? pw / 2 : 0;
+ end = pw;
+ break;
+ }
+ }
+
+ if(isDrawMode) {
+ switch(fullLayout.newshape.drawdirection) {
+ case 'vertical':
+ direction = 'h';
+ start = isEllipse ? ph / 2 : 0;
+ end = ph;
+ break;
+ case 'horizontal':
+ direction = 'v';
+ start = isEllipse ? pw / 2 : 0;
+ end = pw;
+ break;
+ case 'ortho':
+ if(dx < dy) {
+ direction = 'h';
+ start = y0;
+ end = y1;
+ } else {
+ direction = 'v';
+ start = x0;
+ end = x1;
+ }
+ break;
+ default: // i.e. case of 'diagonal'
+ direction = 'd';
+ }
+ }
+
+ if(direction === 'h') {
+ // horizontal motion
+ currentPolygon = isLineOrEllipse ?
+ handleEllipse(isEllipse, [x1, start], [x1, end]) : // using x1 instead of x0 allows adjusting the line while drawing
+ [[x0, start], [x0, end], [x1, end], [x1, start]]; // make a vertical box
+
+ currentPolygon.xmin = isLineOrEllipse ? x1 : Math.min(x0, x1);
+ currentPolygon.xmax = isLineOrEllipse ? x1 : Math.max(x0, x1);
+ currentPolygon.ymin = Math.min(start, end);
+ currentPolygon.ymax = Math.max(start, end);
+ // extras to guide users in keeping a straight selection
+ corners.attr('d', 'M' + currentPolygon.xmin + ',' + (y0 - MINSELECT) +
+ 'h-4v' + (2 * MINSELECT) + 'h4Z' +
+ 'M' + (currentPolygon.xmax - 1) + ',' + (y0 - MINSELECT) +
+ 'h4v' + (2 * MINSELECT) + 'h-4Z');
+ } else if(direction === 'v') {
+ // vertical motion
+ currentPolygon = isLineOrEllipse ?
+ handleEllipse(isEllipse, [start, y1], [end, y1]) : // using y1 instead of y0 allows adjusting the line while drawing
+ [[start, y0], [start, y1], [end, y1], [end, y0]]; // make a horizontal box
+
+ currentPolygon.xmin = Math.min(start, end);
+ currentPolygon.xmax = Math.max(start, end);
+ currentPolygon.ymin = isLineOrEllipse ? y1 : Math.min(y0, y1);
+ currentPolygon.ymax = isLineOrEllipse ? y1 : Math.max(y0, y1);
+ corners.attr('d', 'M' + (x0 - MINSELECT) + ',' + currentPolygon.ymin +
+ 'v-4h' + (2 * MINSELECT) + 'v4Z' +
+ 'M' + (x0 - MINSELECT) + ',' + (currentPolygon.ymax - 1) +
+ 'v4h' + (2 * MINSELECT) + 'v-4Z');
+ } else if(direction === 'd') {
+ // diagonal motion
+ currentPolygon = isLineOrEllipse ?
+ handleEllipse(isEllipse, [x0, y0], [x1, y1]) :
+ [[x0, y0], [x0, y1], [x1, y1], [x1, y0]];
+
+ currentPolygon.xmin = Math.min(x0, x1);
+ currentPolygon.xmax = Math.max(x0, x1);
+ currentPolygon.ymin = Math.min(y0, y1);
+ currentPolygon.ymax = Math.max(y0, y1);
+ corners.attr('d', 'M0,0Z');
+ }
+ } else if(isFreeMode) {
+ filterPoly.addPt([x1, y1]);
+ currentPolygon = filterPoly.filtered;
+ }
+
+ // create outline & tester
+ if(dragOptions.selectionDefs && dragOptions.selectionDefs.length) {
+ mergedPolygons = mergePolygons(dragOptions.mergedPolygons, currentPolygon, subtract);
+
+ currentPolygon.subtract = subtract;
+ selectionTesters = multiTester(dragOptions.selectionDefs.concat([currentPolygon]));
+ } else {
+ mergedPolygons = [currentPolygon];
+ selectionTesters = polygonTester(currentPolygon);
+ }
+
+ // display polygons on the screen
+ displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
+
+ if(isSelectMode) {
+ var _res = reselect(gd);
+ var extraPoints = _res.eventData ? _res.eventData.points.slice() : [];
+
+ _res = reselect(gd, selectionTesters, searchTraces, dragOptions);
+ selectionTesters = _res.selectionTesters;
+ eventData = _res.eventData;
+
+ var poly;
+ if(filterPoly) {
+ poly = filterPoly.filtered;
+ } else {
+ poly = castMultiPolygon(mergedPolygons);
+ }
+
+ throttle.throttle(
+ throttleID,
+ constants.SELECTDELAY,
+ function() {
+ selection = _doSelect(selectionTesters, searchTraces);
+
+ var newPoints = selection.slice();
+
+ for(var w = 0; w < extraPoints.length; w++) {
+ var p = extraPoints[w];
+ var found = false;
+ for(var u = 0; u < newPoints.length; u++) {
+ if(
+ newPoints[u].curveNumber === p.curveNumber &&
+ newPoints[u].pointNumber === p.pointNumber
+ ) {
+ found = true;
+ break;
+ }
+ }
+ if(!found) newPoints.push(p);
+ }
+
+ if(newPoints.length) {
+ if(!eventData) eventData = {};
+ eventData.points = newPoints;
+ }
+
+ fillRangeItems(eventData, poly);
+
+ emitSelecting(gd, eventData);
+ }
+ );
+ }
+ };
+
+ dragOptions.clickFn = function(numClicks, evt) {
+ corners.remove();
+
+ if(gd._fullLayout._activeShapeIndex >= 0) {
+ gd._fullLayout._deactivateShape(gd);
+ return;
+ }
+ if(isDrawMode) return;
+
+ var clickmode = fullLayout.clickmode;
+
+ throttle.done(throttleID).then(function() {
+ throttle.clear(throttleID);
+ if(numClicks === 2) {
+ // clear selection on doubleclick
+ outlines.remove();
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ searchInfo._module.selectPoints(searchInfo, false);
+ }
+
+ updateSelectedState(gd, searchTraces);
+
+ clearSelectionsCache(dragOptions);
+
+ emitDeselect(gd);
+
+ if(searchTraces.length) {
+ var clickedXaxis = searchTraces[0].xaxis;
+ var clickedYaxis = searchTraces[0].yaxis;
+
+ if(clickedXaxis && clickedYaxis) {
+ // drop selections in the clicked subplot
+ var subSelections = [];
+ var allSelections = gd._fullLayout.selections;
+ for(var k = 0; k < allSelections.length; k++) {
+ var s = allSelections[k];
+ if(!s) continue; // also drop null selections if any
+
+ if(
+ s.xref !== clickedXaxis._id ||
+ s.yref !== clickedYaxis._id
+ ) {
+ subSelections.push(s);
+ }
+ }
+
+ Registry.call('_guiRelayout', gd, {
+ selections: subSelections
+ });
+ }
+ }
+ } else {
+ if(clickmode.indexOf('select') > -1) {
+ selectOnClick(evt, gd, dragOptions.xaxes, dragOptions.yaxes,
+ dragOptions.subplot, dragOptions, outlines);
+ }
+
+ if(clickmode === 'event') {
+ // TODO: remove in v3 - this was probably never intended to work as it does,
+ // but in case anyone depends on it we don't want to break it now.
+ // Note that click-to-select introduced pre v3 also emitts proper
+ // event data when clickmode is having 'select' in its flag list.
+ emitSelected(gd, undefined);
+ }
+ }
+
+ Fx.click(gd, evt);
+ }).catch(Lib.error);
+ };
+
+ dragOptions.doneFn = function() {
+ corners.remove();
+
+ throttle.done(throttleID).then(function() {
+ throttle.clear(throttleID);
+
+ if(!immediateSelect && currentPolygon && dragOptions.selectionDefs) {
+ // save last polygons
+ currentPolygon.subtract = subtract;
+ dragOptions.selectionDefs.push(currentPolygon);
+
+ // we have to keep reference to arrays container
+ dragOptions.mergedPolygons.length = 0;
+ [].push.apply(dragOptions.mergedPolygons, mergedPolygons);
+ }
+
+ if(immediateSelect || isDrawMode) {
+ clearSelectionsCache(dragOptions, immediateSelect);
+ }
+
+ if(dragOptions.doneFnCompleted) {
+ dragOptions.doneFnCompleted(selection);
+ }
+
+ if(isSelectMode) {
+ emitSelected(gd, eventData);
+ }
+ }).catch(Lib.error);
+ };
+}
+
+function selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutlines) {
+ var hoverData = gd._hoverdata;
+ var fullLayout = gd._fullLayout;
+ var clickmode = fullLayout.clickmode;
+ var sendEvents = clickmode.indexOf('event') > -1;
+ var selection = [];
+ var searchTraces, searchInfo, currentSelectionDef, selectionTesters, traceSelection;
+ var thisTracesSelection, pointOrBinSelected, subtract, eventData, i;
+
+ if(isHoverDataSet(hoverData)) {
+ coerceSelectionsCache(evt, gd, dragOptions);
+ searchTraces = determineSearchTraces(gd, xAxes, yAxes, subplot);
+ var clickedPtInfo = extractClickedPtInfo(hoverData, searchTraces);
+ var isBinnedTrace = clickedPtInfo.pointNumbers.length > 0;
+
+
+ // Note: potentially costly operation isPointOrBinSelected is
+ // called as late as possible through the use of an assignment
+ // in an if condition.
+ if(isBinnedTrace ?
+ isOnlyThisBinSelected(searchTraces, clickedPtInfo) :
+ isOnlyOnePointSelected(searchTraces) &&
+ (pointOrBinSelected = isPointOrBinSelected(clickedPtInfo))) {
+ if(polygonOutlines) polygonOutlines.remove();
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ searchInfo._module.selectPoints(searchInfo, false);
+ }
+
+ updateSelectedState(gd, searchTraces);
+
+ clearSelectionsCache(dragOptions);
+
+ if(sendEvents) {
+ emitDeselect(gd);
+ }
+ } else {
+ subtract = evt.shiftKey &&
+ (pointOrBinSelected !== undefined ?
+ pointOrBinSelected :
+ isPointOrBinSelected(clickedPtInfo));
+ currentSelectionDef = newPointSelectionDef(clickedPtInfo.pointNumber, clickedPtInfo.searchInfo, subtract);
+
+ var allSelectionDefs = dragOptions.selectionDefs.concat([currentSelectionDef]);
+ selectionTesters = multiTester(allSelectionDefs, selectionTesters);
+
+ for(i = 0; i < searchTraces.length; i++) {
+ traceSelection = searchTraces[i]._module.selectPoints(searchTraces[i], selectionTesters);
+ thisTracesSelection = fillSelectionItem(traceSelection, searchTraces[i]);
+
+ if(selection.length) {
+ for(var j = 0; j < thisTracesSelection.length; j++) {
+ selection.push(thisTracesSelection[j]);
+ }
+ } else selection = thisTracesSelection;
+ }
+
+ eventData = {points: selection};
+ updateSelectedState(gd, searchTraces, eventData);
+
+ if(currentSelectionDef && dragOptions) {
+ dragOptions.selectionDefs.push(currentSelectionDef);
+ }
+
+ if(polygonOutlines) {
+ var polygons = dragOptions.mergedPolygons;
+ var isOpenMode = openMode(dragOptions.dragmode);
+
+ // display polygons on the screen
+ displayOutlines(convertPoly(polygons, isOpenMode), polygonOutlines, dragOptions);
+ }
+
+ if(sendEvents) {
+ emitSelected(gd, eventData);
+ }
+ }
+ }
+}
+
+/**
+ * Constructs a new point selection definition object.
+ */
+function newPointSelectionDef(pointNumber, searchInfo, subtract) {
+ return {
+ pointNumber: pointNumber,
+ searchInfo: searchInfo,
+ subtract: !!subtract
+ };
+}
+
+function isPointSelectionDef(o) {
+ return 'pointNumber' in o && 'searchInfo' in o;
+}
+
+/*
+ * Constructs a new point number tester.
+ */
+function newPointNumTester(pointSelectionDef) {
+ return {
+ xmin: 0,
+ xmax: 0,
+ ymin: 0,
+ ymax: 0,
+ pts: [],
+ contains: function(pt, omitFirstEdge, pointNumber, searchInfo) {
+ var idxWantedTrace = pointSelectionDef.searchInfo.cd[0].trace._expandedIndex;
+ var idxActualTrace = searchInfo.cd[0].trace._expandedIndex;
+ return idxActualTrace === idxWantedTrace &&
+ pointNumber === pointSelectionDef.pointNumber;
+ },
+ isRect: false,
+ degenerate: false,
+ subtract: !!pointSelectionDef.subtract
+ };
+}
+
+/**
+ * Wraps multiple selection testers.
+ *
+ * @param {Array} list - An array of selection testers.
+ *
+ * @return a selection tester object with a contains function
+ * that can be called to evaluate a point against all wrapped
+ * selection testers that were passed in list.
+ */
+function multiTester(list) {
+ if(!list.length) return;
+
+ var testers = [];
+ var xmin = isPointSelectionDef(list[0]) ? 0 : list[0][0][0];
+ var xmax = xmin;
+ var ymin = isPointSelectionDef(list[0]) ? 0 : list[0][0][1];
+ var ymax = ymin;
+
+ for(var i = 0; i < list.length; i++) {
+ if(isPointSelectionDef(list[i])) {
+ testers.push(newPointNumTester(list[i]));
+ } else {
+ var tester = polygonTester(list[i]);
+ tester.subtract = !!list[i].subtract;
+ testers.push(tester);
+
+ xmin = Math.min(xmin, tester.xmin);
+ xmax = Math.max(xmax, tester.xmax);
+ ymin = Math.min(ymin, tester.ymin);
+ ymax = Math.max(ymax, tester.ymax);
+ }
+ }
+
+ /**
+ * Tests if the given point is within this tester.
+ *
+ * @param {Array} pt - [0] is the x coordinate, [1] is the y coordinate of the point.
+ * @param {*} arg - An optional parameter to pass down to wrapped testers.
+ * @param {number} pointNumber - The point number of the point within the underlying data array.
+ * @param {number} searchInfo - An object identifying the trace the point is contained in.
+ *
+ * @return {boolean} true if point is considered to be selected, false otherwise.
+ */
+ function contains(pt, arg, pointNumber, searchInfo) {
+ var contained = false;
+ for(var i = 0; i < testers.length; i++) {
+ if(testers[i].contains(pt, arg, pointNumber, searchInfo)) {
+ // if contained by subtract tester - exclude the point
+ contained = !testers[i].subtract;
+ }
+ }
+
+ return contained;
+ }
+
+ return {
+ xmin: xmin,
+ xmax: xmax,
+ ymin: ymin,
+ ymax: ymax,
+ pts: [],
+ contains: contains,
+ isRect: false,
+ degenerate: false
+ };
+}
+
+function coerceSelectionsCache(evt, gd, dragOptions) {
+ var fullLayout = gd._fullLayout;
+ var plotinfo = dragOptions.plotinfo;
+ var dragmode = dragOptions.dragmode;
+
+ var selectingOnSameSubplot = (
+ fullLayout._lastSelectedSubplot &&
+ fullLayout._lastSelectedSubplot === plotinfo.id
+ );
+
+ var hasModifierKey = (evt.shiftKey || evt.altKey) &&
+ !(drawMode(dragmode) && openMode(dragmode));
+
+ if(
+ selectingOnSameSubplot &&
+ hasModifierKey &&
+ plotinfo.selection &&
+ plotinfo.selection.selectionDefs &&
+ !dragOptions.selectionDefs
+ ) {
+ // take over selection definitions from prev mode, if any
+ dragOptions.selectionDefs = plotinfo.selection.selectionDefs;
+ dragOptions.mergedPolygons = plotinfo.selection.mergedPolygons;
+ } else if(!hasModifierKey || !plotinfo.selection) {
+ clearSelectionsCache(dragOptions);
+ }
+
+ // clear selection outline when selecting a different subplot
+ if(!selectingOnSameSubplot) {
+ clearOutline(gd);
+ fullLayout._lastSelectedSubplot = plotinfo.id;
+ }
+}
+
+function hasActiveShape(gd) {
+ return gd._fullLayout._activeShapeIndex >= 0;
+}
+
+function hasActiveSelection(gd) {
+ return gd._fullLayout._activeSelectionIndex >= 0;
+}
+
+function clearSelectionsCache(dragOptions, immediateSelect) {
+ var dragmode = dragOptions.dragmode;
+ var plotinfo = dragOptions.plotinfo;
+
+ var gd = dragOptions.gd;
+ if(hasActiveShape(gd)) {
+ gd._fullLayout._deactivateShape(gd);
+ }
+ if(hasActiveSelection(gd)) {
+ gd._fullLayout._deactivateSelection(gd);
+ }
+
+ var fullLayout = gd._fullLayout;
+ var zoomLayer = fullLayout._zoomlayer;
+
+ var isDrawMode = drawMode(dragmode);
+ var isSelectMode = selectMode(dragmode);
+
+ if(isDrawMode || isSelectMode) {
+ var outlines = zoomLayer.selectAll('.select-outline-' + plotinfo.id);
+ if(outlines && gd._fullLayout._outlining) {
+ // add shape
+ var shapes;
+ if(isDrawMode) {
+ shapes = newShapes(outlines, dragOptions);
+ }
+ if(shapes) {
+ Registry.call('_guiRelayout', gd, {
+ shapes: shapes
+ });
+ }
+
+ // add selection
+ var selections;
+ if(
+ isSelectMode &&
+ !hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
+ ) {
+ selections = newSelections(outlines, dragOptions);
+ }
+ if(selections) {
+ Registry.call('_guiRelayout', gd, {
+ selections: selections
+ }).then(function() {
+ if(immediateSelect) { activateLastSelection(gd); }
+ });
+ }
+
+ gd._fullLayout._outlining = false;
+ }
+ }
+
+ plotinfo.selection = {};
+ plotinfo.selection.selectionDefs = dragOptions.selectionDefs = [];
+ plotinfo.selection.mergedPolygons = dragOptions.mergedPolygons = [];
+}
+
+function getAxId(ax) {
+ return ax._id;
+}
+
+function determineSearchTraces(gd, xAxes, yAxes, subplot) {
+ if(!gd.calcdata) return [];
+
+ var searchTraces = [];
+ var xAxisIds = xAxes.map(getAxId);
+ var yAxisIds = yAxes.map(getAxId);
+ var cd, trace, i;
+
+ for(i = 0; i < gd.calcdata.length; i++) {
+ cd = gd.calcdata[i];
+ trace = cd[0].trace;
+
+ if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
+
+ if(
+ hasSubplot({subplot: subplot}) &&
+ (trace.subplot === subplot || trace.geo === subplot)
+ ) {
+ searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
+ } else if(trace.type === 'splom') {
+ // FIXME: make sure we don't have more than single axis for splom
+ if(trace._xaxes[xAxisIds[0]] && trace._yaxes[yAxisIds[0]]) {
+ var info = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
+ info.scene = gd._fullLayout._splomScenes[trace.uid];
+ searchTraces.push(info);
+ }
+ } else if(trace.type === 'sankey') {
+ var sankeyInfo = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
+ searchTraces.push(sankeyInfo);
+ } else {
+ if(xAxisIds.indexOf(trace.xaxis) === -1) continue;
+ if(yAxisIds.indexOf(trace.yaxis) === -1) continue;
+
+ searchTraces.push(createSearchInfo(trace._module, cd,
+ getFromId(gd, trace.xaxis), getFromId(gd, trace.yaxis)));
+ }
+ }
+
+ return searchTraces;
+}
+
+function createSearchInfo(module, calcData, xaxis, yaxis) {
+ return {
+ _module: module,
+ cd: calcData,
+ xaxis: xaxis,
+ yaxis: yaxis
+ };
+}
+
+function isHoverDataSet(hoverData) {
+ return hoverData &&
+ Array.isArray(hoverData) &&
+ hoverData[0].hoverOnBox !== true;
+}
+
+function extractClickedPtInfo(hoverData, searchTraces) {
+ var hoverDatum = hoverData[0];
+ var pointNumber = -1;
+ var pointNumbers = [];
+ var searchInfo, i;
+
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ if(hoverDatum.fullData._expandedIndex === searchInfo.cd[0].trace._expandedIndex) {
+ // Special case for box (and violin)
+ if(hoverDatum.hoverOnBox === true) {
+ break;
+ }
+
+ // Hint: in some traces like histogram, one graphical element
+ // doesn't correspond to one particular data point, but to
+ // bins of data points. Thus, hoverDatum can have a binNumber
+ // property instead of pointNumber.
+ if(hoverDatum.pointNumber !== undefined) {
+ pointNumber = hoverDatum.pointNumber;
+ } else if(hoverDatum.binNumber !== undefined) {
+ pointNumber = hoverDatum.binNumber;
+ pointNumbers = hoverDatum.pointNumbers;
+ }
+
+ break;
+ }
+ }
+
+ return {
+ pointNumber: pointNumber,
+ pointNumbers: pointNumbers,
+ searchInfo: searchInfo
+ };
+}
+
+function isPointOrBinSelected(clickedPtInfo) {
+ var trace = clickedPtInfo.searchInfo.cd[0].trace;
+ var ptNum = clickedPtInfo.pointNumber;
+ var ptNums = clickedPtInfo.pointNumbers;
+ var ptNumsSet = ptNums.length > 0;
+
+ // When pointsNumbers is set (e.g. histogram's binning),
+ // it is assumed that when the first point of
+ // a bin is selected, all others are as well
+ var ptNumToTest = ptNumsSet ? ptNums[0] : ptNum;
+
+ // TODO potential performance improvement
+ // Primarily we need this function to determine if a click adds
+ // or subtracts from a selection.
+ // In cases `trace.selectedpoints` is a huge array, indexOf
+ // might be slow. One remedy would be to introduce a hash somewhere.
+ return trace.selectedpoints ? trace.selectedpoints.indexOf(ptNumToTest) > -1 : false;
+}
+
+function isOnlyThisBinSelected(searchTraces, clickedPtInfo) {
+ var tracesWithSelectedPts = [];
+ var searchInfo, trace, isSameTrace, i;
+
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ if(searchInfo.cd[0].trace.selectedpoints && searchInfo.cd[0].trace.selectedpoints.length > 0) {
+ tracesWithSelectedPts.push(searchInfo);
+ }
+ }
+
+ if(tracesWithSelectedPts.length === 1) {
+ isSameTrace = tracesWithSelectedPts[0] === clickedPtInfo.searchInfo;
+ if(isSameTrace) {
+ trace = clickedPtInfo.searchInfo.cd[0].trace;
+ if(trace.selectedpoints.length === clickedPtInfo.pointNumbers.length) {
+ for(i = 0; i < clickedPtInfo.pointNumbers.length; i++) {
+ if(trace.selectedpoints.indexOf(clickedPtInfo.pointNumbers[i]) < 0) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+function isOnlyOnePointSelected(searchTraces) {
+ var len = 0;
+ var searchInfo, trace, i;
+
+ for(i = 0; i < searchTraces.length; i++) {
+ searchInfo = searchTraces[i];
+ trace = searchInfo.cd[0].trace;
+ if(trace.selectedpoints) {
+ if(trace.selectedpoints.length > 1) return false;
+
+ len += trace.selectedpoints.length;
+ if(len > 1) return false;
+ }
+ }
+
+ return len === 1;
+}
+
+function updateSelectedState(gd, searchTraces, eventData) {
+ var i;
+
+ // before anything else, update preGUI if necessary
+ for(i = 0; i < searchTraces.length; i++) {
+ var fullInputTrace = searchTraces[i].cd[0].trace._fullInput;
+ var tracePreGUI = gd._fullLayout._tracePreGUI[fullInputTrace.uid] || {};
+ if(tracePreGUI.selectedpoints === undefined) {
+ tracePreGUI.selectedpoints = fullInputTrace._input.selectedpoints || null;
+ }
+ }
+
+ var trace;
+ if(eventData) {
+ var pts = eventData.points || [];
+ for(i = 0; i < searchTraces.length; i++) {
+ trace = searchTraces[i].cd[0].trace;
+ trace._input.selectedpoints = trace._fullInput.selectedpoints = [];
+ if(trace._fullInput !== trace) trace.selectedpoints = [];
+ }
+
+ for(var k = 0; k < pts.length; k++) {
+ var pt = pts[k];
+ var data = pt.data;
+ var fullData = pt.fullData;
+ var pointIndex = pt.pointIndex;
+ var pointIndices = pt.pointIndices;
+ if(pointIndices) {
+ [].push.apply(data.selectedpoints, pointIndices);
+ if(trace._fullInput !== trace) {
+ [].push.apply(fullData.selectedpoints, pointIndices);
+ }
+ } else {
+ data.selectedpoints.push(pointIndex);
+ if(trace._fullInput !== trace) {
+ fullData.selectedpoints.push(pointIndex);
+ }
+ }
+ }
+ } else {
+ for(i = 0; i < searchTraces.length; i++) {
+ trace = searchTraces[i].cd[0].trace;
+ delete trace.selectedpoints;
+ delete trace._input.selectedpoints;
+ if(trace._fullInput !== trace) {
+ delete trace._fullInput.selectedpoints;
+ }
+ }
+ }
+
+ updateReglSelectedState(gd, searchTraces);
+}
+
+function updateReglSelectedState(gd, searchTraces) {
+ var hasRegl = false;
+
+ for(var i = 0; i < searchTraces.length; i++) {
+ var searchInfo = searchTraces[i];
+ var cd = searchInfo.cd;
+
+ if(Registry.traceIs(cd[0].trace, 'regl')) {
+ hasRegl = true;
+ }
+
+ var _module = searchInfo._module;
+ var fn = _module.styleOnSelect || _module.style;
+ if(fn) {
+ fn(gd, cd, cd[0].node3);
+ if(cd[0].nodeRangePlot3) fn(gd, cd, cd[0].nodeRangePlot3);
+ }
+ }
+
+ if(hasRegl) {
+ clearGlCanvases(gd);
+ redrawReglTraces(gd);
+ }
+}
+
+function mergePolygons(list, poly, subtract) {
+ var fn = subtract ?
+ polybool.difference :
+ polybool.union;
+
+ var res = fn({
+ regions: list
+ }, {
+ regions: [poly]
+ });
+
+ var allPolygons = res.regions.reverse();
+
+ for(var i = 0; i < allPolygons.length; i++) {
+ var polygon = allPolygons[i];
+
+ polygon.subtract = getSubtract(polygon, allPolygons.slice(0, i));
+ }
+
+ return allPolygons;
+}
+
+function fillSelectionItem(selection, searchInfo) {
+ if(Array.isArray(selection)) {
+ var cd = searchInfo.cd;
+ var trace = searchInfo.cd[0].trace;
+
+ for(var i = 0; i < selection.length; i++) {
+ selection[i] = makeEventData(selection[i], trace, cd);
+ }
+ }
+
+ return selection;
+}
+
+function convertPoly(polygonsIn, isOpenMode) { // add M and L command to draft positions
+ var polygonsOut = [];
+ for(var i = 0; i < polygonsIn.length; i++) {
+ polygonsOut[i] = [];
+ for(var j = 0; j < polygonsIn[i].length; j++) {
+ polygonsOut[i][j] = [];
+ polygonsOut[i][j][0] = j ? 'L' : 'M';
+ for(var k = 0; k < polygonsIn[i][j].length; k++) {
+ polygonsOut[i][j].push(
+ polygonsIn[i][j][k]
+ );
+ }
+ }
+
+ if(!isOpenMode) {
+ polygonsOut[i].push([
+ 'Z',
+ polygonsOut[i][0][1], // initial x
+ polygonsOut[i][0][2] // initial y
+ ]);
+ }
+ }
+
+ return polygonsOut;
+}
+
+function _doSelect(selectionTesters, searchTraces) {
+ var allSelections = [];
+
+ var thisSelection;
+ var traceSelections = [];
+ var traceSelection;
+ for(var i = 0; i < searchTraces.length; i++) {
+ var searchInfo = searchTraces[i];
+
+ traceSelection = searchInfo._module.selectPoints(searchInfo, selectionTesters);
+ traceSelections.push(traceSelection);
+
+ thisSelection = fillSelectionItem(traceSelection, searchInfo);
+
+ allSelections = allSelections.concat(thisSelection);
+ }
+
+ return allSelections;
+}
+
+function reselect(gd, selectionTesters, searchTraces, dragOptions) {
+ var hadSearchTraces = !!searchTraces;
+ var plotinfo, xRef, yRef;
+ if(dragOptions) {
+ plotinfo = dragOptions.plotinfo;
+ xRef = dragOptions.xaxes[0]._id;
+ yRef = dragOptions.yaxes[0]._id;
+ }
+
+ var allSelections = [];
+ var allSearchTraces = [];
+
+ // select layout.selection polygons
+ var layoutPolygons = getLayoutPolygons(gd);
+
+ // add draft outline polygons to layoutPolygons
+ var fullLayout = gd._fullLayout;
+ if(plotinfo) {
+ var zoomLayer = fullLayout._zoomlayer;
+ var mode = fullLayout.dragmode;
+ var isDrawMode = drawMode(mode);
+ var isSelectMode = selectMode(mode);
+ if(isDrawMode || isSelectMode) {
+ var xaxis = getFromId(gd, xRef, 'x');
+ var yaxis = getFromId(gd, yRef, 'y');
+ if(xaxis && yaxis) {
+ var outlines = zoomLayer.selectAll('.select-outline-' + plotinfo.id);
+ if(outlines && gd._fullLayout._outlining) {
+ if(outlines.length) {
+ var e = outlines[0][0]; // pick first
+ var d = e.getAttribute('d');
+ var outlinePolys = readPaths(d, gd, plotinfo);
+
+ var draftPolygons = [];
+ for(var u = 0; u < outlinePolys.length; u++) {
+ var p = outlinePolys[u];
+ var polygon = [];
+ for(var t = 0; t < p.length; t++) {
+ polygon.push([
+ convert(xaxis, p[t][1]),
+ convert(yaxis, p[t][2])
+ ]);
+ }
+
+ polygon.xref = xRef;
+ polygon.yref = yRef;
+ polygon.subtract = getSubtract(polygon, draftPolygons);
+
+ draftPolygons.push(polygon);
+ }
+
+ layoutPolygons = layoutPolygons.concat(draftPolygons);
+ }
+ }
+ }
+ }
+ }
+
+ var subplots = (xRef && yRef) ? [xRef + yRef] :
+ fullLayout._subplots.cartesian;
+
+ epmtySplomSelectionBatch(gd);
+
+ var seenSplom = {};
+
+ for(var i = 0; i < subplots.length; i++) {
+ var subplot = subplots[i];
+ var yAt = subplot.indexOf('y');
+ var _xRef = subplot.slice(0, yAt);
+ var _yRef = subplot.slice(yAt);
+
+ var _selectionTesters = (xRef && yRef) ? selectionTesters : undefined;
+ _selectionTesters = addTester(layoutPolygons, _xRef, _yRef, _selectionTesters);
+
+ if(_selectionTesters) {
+ var _searchTraces = searchTraces;
+ if(!hadSearchTraces) {
+ var _xaxis = getFromId(gd, _xRef, 'x');
+ var _yaxis = getFromId(gd, _yRef, 'y');
+
+ _searchTraces = determineSearchTraces(
+ gd,
+ [_xaxis],
+ [_yaxis],
+ subplot
+ );
+
+ for(var w = 0; w < _searchTraces.length; w++) {
+ var s = _searchTraces[w];
+ var cd0 = s.cd[0];
+ var trace = cd0.trace;
+
+ if(s._module.name === 'scattergl' && !cd0.t.xpx) {
+ var x = trace.x;
+ var y = trace.y;
+ var len = trace._length;
+ // generate stash for scattergl
+ cd0.t.xpx = [];
+ cd0.t.ypx = [];
+ for(var j = 0; j < len; j++) {
+ cd0.t.xpx[j] = _xaxis.c2p(x[j]);
+ cd0.t.ypx[j] = _yaxis.c2p(y[j]);
+ }
+ }
+
+ if(s._module.name === 'splom') {
+ if(!seenSplom[trace.uid]) {
+ seenSplom[trace.uid] = true;
+ }
+ }
+ }
+ }
+ var selection = _doSelect(_selectionTesters, _searchTraces);
+
+ allSelections = allSelections.concat(selection);
+ allSearchTraces = allSearchTraces.concat(_searchTraces);
+ }
+ }
+
+ var eventData = {points: allSelections};
+ updateSelectedState(gd, allSearchTraces, eventData);
+
+ var clickmode = fullLayout.clickmode;
+ var sendEvents = clickmode.indexOf('event') > -1;
+
+ if(
+ !plotinfo && // get called from plot_api & plots
+ fullLayout._reselect
+ ) {
+ if(sendEvents) {
+ var activePolygons = getLayoutPolygons(gd, true);
+
+ var xref = activePolygons[0].xref;
+ var yref = activePolygons[0].yref;
+ if(xref && yref) {
+ var poly = castMultiPolygon(activePolygons);
+
+ var fillRangeItems = makeFillRangeItems([
+ getFromId(gd, xref, 'x'),
+ getFromId(gd, yref, 'y')
+ ]);
+
+ fillRangeItems(eventData, poly);
+ }
+
+ emitSelected(gd, eventData);
+ }
+
+ fullLayout._reselect = false;
+ }
+
+ if(
+ !plotinfo && // get called from plot_api & plots
+ fullLayout._deselect
+ ) {
+ var deselect = fullLayout._deselect;
+ xRef = deselect.xref;
+ yRef = deselect.yref;
+
+ if(!subplotSelected(xRef, yRef, allSearchTraces)) {
+ deselectSubplot(gd, xRef, yRef, searchTraces);
+ }
+
+ if(sendEvents) {
+ if(eventData.points.length) {
+ emitSelected(gd, eventData);
+ } else {
+ gd.emit('plotly_deselect', null);
+ }
+ }
+
+ fullLayout._deselect = false;
+ }
+
+ return {
+ eventData: eventData,
+ selectionTesters: selectionTesters
+ };
+}
+
+function epmtySplomSelectionBatch(gd) {
+ var cd = gd.calcdata;
+ if(!cd) return;
+
+ for(var i = 0; i < cd.length; i++) {
+ var cd0 = cd[i][0];
+ var trace = cd0.trace;
+ var splomScenes = gd._fullLayout._splomScenes;
+ if(splomScenes) {
+ var scene = splomScenes[trace.uid];
+ if(scene) {
+ scene.selectBatch = [];
+ }
+ }
+ }
+}
+
+function subplotSelected(xRef, yRef, searchTraces) {
+ for(var i = 0; i < searchTraces.length; i++) {
+ var s = searchTraces[i];
+ if(
+ (s.xaxis && s.xaxis._id === xRef) &&
+ (s.yaxis && s.yaxis._id === yRef)
+ ) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function deselectSubplot(gd, xRef, yRef, searchTraces) {
+ searchTraces = determineSearchTraces(
+ gd,
+ [getFromId(gd, xRef, 'x')],
+ [getFromId(gd, yRef, 'y')],
+ xRef + yRef
+ );
+
+ for(var k = 0; k < searchTraces.length; k++) {
+ var searchInfo = searchTraces[k];
+ searchInfo._module.selectPoints(searchInfo, false);
+ }
+
+ updateSelectedState(gd, searchTraces);
+}
+
+function addTester(layoutPolygons, xRef, yRef, selectionTesters) {
+ var mergedPolygons;
+
+ for(var i = 0; i < layoutPolygons.length; i++) {
+ var currentPolygon = layoutPolygons[i];
+ if(xRef !== currentPolygon.xref || yRef !== currentPolygon.yref) continue;
+
+ if(mergedPolygons) {
+ var subtract = !!currentPolygon.subtract;
+ mergedPolygons = mergePolygons(mergedPolygons, currentPolygon, subtract);
+ selectionTesters = multiTester(mergedPolygons);
+ } else {
+ mergedPolygons = [currentPolygon];
+ selectionTesters = polygonTester(currentPolygon);
+ }
+ }
+
+ return selectionTesters;
+}
+
+function getLayoutPolygons(gd, onlyActiveOnes) {
+ var allPolygons = [];
+
+ var fullLayout = gd._fullLayout;
+ var allSelections = fullLayout.selections;
+ var len = allSelections.length;
+
+ for(var i = 0; i < len; i++) {
+ if(onlyActiveOnes && i !== fullLayout._activeSelectionIndex) continue;
+
+ var selection = allSelections[i];
+ if(!selection) continue;
+
+ var xref = selection.xref;
+ var yref = selection.yref;
+
+ var xaxis = getFromId(gd, xref, 'x');
+ var yaxis = getFromId(gd, yref, 'y');
+
+ var xmin, xmax, ymin, ymax;
+
+ var polygon;
+ if(selection.type === 'rect') {
+ polygon = [];
+
+ var x0 = convert(xaxis, selection.x0);
+ var x1 = convert(xaxis, selection.x1);
+ var y0 = convert(yaxis, selection.y0);
+ var y1 = convert(yaxis, selection.y1);
+ polygon = [[x0, y0], [x0, y1], [x1, y1], [x1, y0]];
+
+ xmin = Math.min(x0, x1);
+ xmax = Math.max(x0, x1);
+ ymin = Math.min(y0, y1);
+ ymax = Math.max(y0, y1);
+
+ polygon.xmin = xmin;
+ polygon.xmax = xmax;
+ polygon.ymin = ymin;
+ polygon.ymax = ymax;
+
+ polygon.xref = xref;
+ polygon.yref = yref;
+
+ polygon.subtract = false;
+ polygon.isRect = true;
+
+ allPolygons.push(polygon);
+ } else if(selection.type === 'path') {
+ var segments = selection.path.split('Z');
+
+ var multiPolygons = [];
+ for(var j = 0; j < segments.length; j++) {
+ var path = segments[j];
+ if(!path) continue;
+ path += 'Z';
+
+ var allX = shapeHelpers.extractPathCoords(path, shapeConstants.paramIsX, 'raw');
+ var allY = shapeHelpers.extractPathCoords(path, shapeConstants.paramIsY, 'raw');
+
+ xmin = Infinity;
+ xmax = -Infinity;
+ ymin = Infinity;
+ ymax = -Infinity;
+
+ polygon = [];
+
+ for(var k = 0; k < allX.length; k++) {
+ var x = convert(xaxis, allX[k]);
+ var y = convert(yaxis, allY[k]);
+
+ polygon.push([x, y]);
+
+ xmin = Math.min(x, xmin);
+ xmax = Math.max(x, xmax);
+ ymin = Math.min(y, ymin);
+ ymax = Math.max(y, ymax);
+ }
+
+ polygon.xmin = xmin;
+ polygon.xmax = xmax;
+ polygon.ymin = ymin;
+ polygon.ymax = ymax;
+
+ polygon.xref = xref;
+ polygon.yref = yref;
+ polygon.subtract = getSubtract(polygon, multiPolygons);
+
+ multiPolygons.push(polygon);
+ allPolygons.push(polygon);
+ }
+ }
+ }
+
+ return allPolygons;
+}
+
+function getSubtract(polygon, previousPolygons) {
+ var subtract = false;
+ for(var i = 0; i < previousPolygons.length; i++) {
+ var previousPolygon = previousPolygons[i];
+
+ // find out if a point of polygon is inside previous polygons
+ for(var k = 0; k < polygon.length; k++) {
+ if(pointInPolygon(polygon[k], previousPolygon)) {
+ subtract = !subtract;
+ break;
+ }
+ }
+ }
+ return subtract;
+}
+
+function convert(ax, d) {
+ if(ax.type === 'date') d = d.replace('_', ' ');
+ return ax.type === 'log' ? ax.c2p(d) : ax.r2p(d, null, ax.calendar);
+}
+
+function castMultiPolygon(allPolygons) {
+ var len = allPolygons.length;
+
+ // descibe multi polygons in one polygon
+ var p = [];
+ for(var i = 0; i < len; i++) {
+ var polygon = allPolygons[i];
+ p = p.concat(polygon);
+
+ // add starting vertex to close
+ // which indicates next polygon
+ p = p.concat([polygon[0]]);
+ }
+
+ return computeRectAndRanges(p);
+}
+
+function computeRectAndRanges(poly) {
+ poly.isRect = poly.length === 5 &&
+ poly[0][0] === poly[4][0] &&
+ poly[0][1] === poly[4][1] &&
+ (
+ poly[0][0] === poly[1][0] &&
+ poly[2][0] === poly[3][0] &&
+ poly[0][1] === poly[3][1] &&
+ poly[1][1] === poly[2][1]
+ ) ||
+ (
+ poly[0][1] === poly[1][1] &&
+ poly[2][1] === poly[3][1] &&
+ poly[0][0] === poly[3][0] &&
+ poly[1][0] === poly[2][0]
+ );
+
+ if(poly.isRect) {
+ poly.xmin = Math.min(poly[0][0], poly[2][0]);
+ poly.xmax = Math.max(poly[0][0], poly[2][0]);
+ poly.ymin = Math.min(poly[0][1], poly[2][1]);
+ poly.ymax = Math.max(poly[0][1], poly[2][1]);
+ }
+
+ return poly;
+}
+
+function makeFillRangeItems(allAxes) {
+ return function(eventData, poly) {
+ var range;
+ var lassoPoints;
+
+ for(var i = 0; i < allAxes.length; i++) {
+ var ax = allAxes[i];
+ var id = ax._id;
+ var axLetter = id.charAt(0);
+
+ if(poly.isRect) {
+ if(!range) range = {};
+ var min = poly[axLetter + 'min'];
+ var max = poly[axLetter + 'max'];
+
+ if(min !== undefined && max !== undefined) {
+ range[id] = [
+ p2r(ax, min),
+ p2r(ax, max)
+ ].sort(ascending);
+ }
+ } else {
+ if(!lassoPoints) lassoPoints = {};
+ lassoPoints[id] = poly.map(axValue(ax));
+ }
+ }
+
+ if(range) {
+ eventData.range = range;
+ }
+
+ if(lassoPoints) {
+ eventData.lassoPoints = lassoPoints;
+ }
+ };
+}
+
+function getFillRangeItems(dragOptions) {
+ var plotinfo = dragOptions.plotinfo;
+
+ return (
+ plotinfo.fillRangeItems || // allow subplots (i.e. geo, mapbox, sankey) to override fillRangeItems routine
+ makeFillRangeItems(dragOptions.xaxes.concat(dragOptions.yaxes))
+ );
+}
+
+function emitSelecting(gd, eventData) {
+ gd.emit('plotly_selecting', eventData);
+}
+
+function emitSelected(gd, eventData) {
+ if(eventData) {
+ eventData.selections = (gd.layout || {}).selections || [];
+ }
+
+ gd.emit('plotly_selected', eventData);
+}
+
+function emitDeselect(gd) {
+ gd.emit('plotly_deselect', null);
+}
+
+module.exports = {
+ reselect: reselect,
+ prepSelect: prepSelect,
+ clearOutline: clearOutline,
+ clearSelectionsCache: clearSelectionsCache,
+ selectOnClick: selectOnClick
+};
+
+},{"../../lib":299,"../../lib/clear_gl_canvases":287,"../../lib/polygon":311,"../../lib/throttle":323,"../../plot_api/subroutines":336,"../../plots/cartesian/axis_ids":350,"../../registry":387,"../color":158,"../dragelement/helpers":176,"../drawing":180,"../fx":198,"../fx/helpers":194,"../shapes/constants":250,"../shapes/display_outlines":252,"../shapes/draw_newshape/helpers":257,"../shapes/draw_newshape/newshapes":258,"../shapes/handle_outline":259,"../shapes/helpers":260,"./constants":239,"./draw":241,"./draw_newselection/newselections":244,"./helpers":245,"point-in-polygon/nested":75,"polybooljs":76}],248:[function(_dereq_,module,exports){
'use strict';
var annAttrs = _dereq_('../annotations/attributes');
@@ -45165,7 +47370,7 @@ module.exports = templatedArray('shape', {
editType: 'arraydraw'
});
-},{"../../constants/axis_placeable_objects":263,"../../lib/extend":281,"../../plot_api/plot_template":323,"../../traces/scatter/attributes":500,"../annotations/attributes":140,"../drawing/attributes":178}],238:[function(_dereq_,module,exports){
+},{"../../constants/axis_placeable_objects":275,"../../lib/extend":293,"../../plot_api/plot_template":335,"../../traces/scatter/attributes":509,"../annotations/attributes":141,"../drawing/attributes":179}],249:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -45277,7 +47482,7 @@ function shapeBounds(ax, v0, v1, path, paramsToUse) {
if(max >= min) return [min, max];
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"./constants":239,"./helpers":248}],239:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":250,"./helpers":260}],250:[function(_dereq_,module,exports){
'use strict';
@@ -45332,7 +47537,7 @@ module.exports = {
}
};
-},{}],240:[function(_dereq_,module,exports){
+},{}],251:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -45361,7 +47566,8 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
var path = coerce('path');
var dfltType = path ? 'path' : 'rect';
var shapeType = coerce('type', dfltType);
- if(shapeOut.type !== 'path') delete shapeOut.path;
+ var noPath = shapeType !== 'path';
+ if(noPath) delete shapeOut.path;
coerce('editable');
coerce('layer');
@@ -45403,7 +47609,7 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
}
// Coerce x0, x1, y0, y1
- if(shapeType !== 'path') {
+ if(noPath) {
var dflt0 = 0.25;
var dflt1 = 0.75;
@@ -45447,14 +47653,415 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
}
}
- if(shapeType === 'path') {
- coerce('path');
- } else {
+ if(noPath) {
Lib.noneOrAll(shapeIn, shapeOut, ['x0', 'x1', 'y0', 'y1']);
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"../../plots/cartesian/axes":334,"./attributes":237,"./helpers":248}],241:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":248,"./helpers":260}],252:[function(_dereq_,module,exports){
+'use strict';
+
+var Lib = _dereq_('../../lib');
+var strTranslate = Lib.strTranslate;
+
+var dragElement = _dereq_('../dragelement');
+var dragHelpers = _dereq_('../dragelement/helpers');
+var drawMode = dragHelpers.drawMode;
+var selectMode = dragHelpers.selectMode;
+
+var Registry = _dereq_('../../registry');
+var Color = _dereq_('../color');
+
+var constants = _dereq_('./draw_newshape/constants');
+var i000 = constants.i000;
+var i090 = constants.i090;
+var i180 = constants.i180;
+var i270 = constants.i270;
+
+var handleOutline = _dereq_('./handle_outline');
+var clearOutlineControllers = handleOutline.clearOutlineControllers;
+
+var helpers = _dereq_('./draw_newshape/helpers');
+var pointsOnRectangle = helpers.pointsOnRectangle;
+var pointsOnEllipse = helpers.pointsOnEllipse;
+var writePaths = helpers.writePaths;
+var newShapes = _dereq_('./draw_newshape/newshapes');
+var newSelections = _dereq_('../selections/draw_newselection/newselections');
+
+module.exports = function displayOutlines(polygons, outlines, dragOptions, nCalls) {
+ if(!nCalls) nCalls = 0;
+
+ var gd = dragOptions.gd;
+
+ function redraw() {
+ // recursive call
+ displayOutlines(polygons, outlines, dragOptions, nCalls++);
+
+ if(pointsOnEllipse(polygons[0])) {
+ update({redrawing: true});
+ }
+ }
+
+ function update(opts) {
+ var updateObject = {};
+
+ if(dragOptions.isActiveShape !== undefined) {
+ dragOptions.isActiveShape = false; // i.e. to disable shape controllers
+ updateObject = newShapes(outlines, dragOptions);
+ }
+
+ if(dragOptions.isActiveSelection !== undefined) {
+ dragOptions.isActiveSelection = false; // i.e. to disable selection controllers
+ updateObject = newSelections(outlines, dragOptions);
+
+ gd._fullLayout._reselect = true;
+ }
+
+ if(Object.keys(updateObject).length) {
+ Registry.call((opts || {}).redrawing ? 'relayout' : '_guiRelayout', gd, updateObject);
+ }
+ }
+
+ var fullLayout = gd._fullLayout;
+ var zoomLayer = fullLayout._zoomlayer;
+
+ var dragmode = dragOptions.dragmode;
+ var isDrawMode = drawMode(dragmode);
+ var isSelectMode = selectMode(dragmode);
+
+ if(isDrawMode || isSelectMode) {
+ gd._fullLayout._outlining = true;
+ }
+
+ clearOutlineControllers(gd);
+
+ // make outline
+ outlines.attr('d', writePaths(polygons));
+
+ // add controllers
+ var vertexDragOptions;
+ var groupDragOptions;
+ var indexI; // cell index
+ var indexJ; // vertex or cell-controller index
+ var copyPolygons;
+
+ if(!nCalls && (
+ dragOptions.isActiveShape ||
+ dragOptions.isActiveSelection
+ )) {
+ copyPolygons = recordPositions([], polygons);
+
+ var g = zoomLayer.append('g').attr('class', 'outline-controllers');
+ addVertexControllers(g);
+ addGroupControllers();
+ }
+
+ function startDragVertex(evt) {
+ indexI = +evt.srcElement.getAttribute('data-i');
+ indexJ = +evt.srcElement.getAttribute('data-j');
+
+ vertexDragOptions[indexI][indexJ].moveFn = moveVertexController;
+ }
+
+ function moveVertexController(dx, dy) {
+ if(!polygons.length) return;
+
+ var x0 = copyPolygons[indexI][indexJ][1];
+ var y0 = copyPolygons[indexI][indexJ][2];
+
+ var cell = polygons[indexI];
+ var len = cell.length;
+ if(pointsOnRectangle(cell)) {
+ var _dx = dx;
+ var _dy = dy;
+ if(dragOptions.isActiveSelection) {
+ // handle an edge contoller for rect selections
+ var nextPoint = getNextPoint(cell, indexJ);
+ if(nextPoint[1] === cell[indexJ][1]) { // a vertical edge
+ _dy = 0;
+ } else { // a horizontal edge
+ _dx = 0;
+ }
+ }
+
+ for(var q = 0; q < len; q++) {
+ if(q === indexJ) continue;
+
+ // move other corners of rectangle
+ var pos = cell[q];
+
+ if(pos[1] === cell[indexJ][1]) {
+ pos[1] = x0 + _dx;
+ }
+
+ if(pos[2] === cell[indexJ][2]) {
+ pos[2] = y0 + _dy;
+ }
+ }
+ // move the corner
+ cell[indexJ][1] = x0 + _dx;
+ cell[indexJ][2] = y0 + _dy;
+
+ if(!pointsOnRectangle(cell)) {
+ // reject result to rectangles with ensure areas
+ for(var j = 0; j < len; j++) {
+ for(var k = 0; k < cell[j].length; k++) {
+ cell[j][k] = copyPolygons[indexI][j][k];
+ }
+ }
+ }
+ } else { // other polylines
+ cell[indexJ][1] = x0 + dx;
+ cell[indexJ][2] = y0 + dy;
+ }
+
+ redraw();
+ }
+
+ function endDragVertexController() {
+ update();
+ }
+
+ function removeVertex() {
+ if(!polygons.length) return;
+ if(!polygons[indexI]) return;
+ if(!polygons[indexI].length) return;
+
+ var newPolygon = [];
+ for(var j = 0; j < polygons[indexI].length; j++) {
+ if(j !== indexJ) {
+ newPolygon.push(
+ polygons[indexI][j]
+ );
+ }
+ }
+
+ if(newPolygon.length > 1 && !(
+ newPolygon.length === 2 && newPolygon[1][0] === 'Z')
+ ) {
+ if(indexJ === 0) {
+ newPolygon[0][0] = 'M';
+ }
+
+ polygons[indexI] = newPolygon;
+
+ redraw();
+ update();
+ }
+ }
+
+ function clickVertexController(numClicks, evt) {
+ if(numClicks === 2) {
+ indexI = +evt.srcElement.getAttribute('data-i');
+ indexJ = +evt.srcElement.getAttribute('data-j');
+
+ var cell = polygons[indexI];
+ if(
+ !pointsOnRectangle(cell) &&
+ !pointsOnEllipse(cell)
+ ) {
+ removeVertex();
+ }
+ }
+ }
+
+ function addVertexControllers(g) {
+ vertexDragOptions = [];
+
+ for(var i = 0; i < polygons.length; i++) {
+ var cell = polygons[i];
+
+ var onRect = pointsOnRectangle(cell);
+ var onEllipse = !onRect && pointsOnEllipse(cell);
+
+ vertexDragOptions[i] = [];
+ var len = cell.length;
+ for(var j = 0; j < len; j++) {
+ if(cell[j][0] === 'Z') continue;
+
+ if(onEllipse &&
+ j !== i000 &&
+ j !== i090 &&
+ j !== i180 &&
+ j !== i270
+ ) {
+ continue;
+ }
+
+ var rectSelection = onRect && dragOptions.isActiveSelection;
+ var nextPoint;
+ if(rectSelection) nextPoint = getNextPoint(cell, j);
+
+ var x = cell[j][1];
+ var y = cell[j][2];
+
+ var vertex = g.append(rectSelection ? 'rect' : 'circle')
+ .attr('data-i', i)
+ .attr('data-j', j)
+ .style({
+ fill: Color.background,
+ stroke: Color.defaultLine,
+ 'stroke-width': 1,
+ 'shape-rendering': 'crispEdges',
+ });
+
+ if(rectSelection) {
+ // convert a vertex controller to an edge controller for rect selections
+ var dx = nextPoint[1] - x;
+ var dy = nextPoint[2] - y;
+
+ var width = dy ? 5 : Math.max(Math.min(25, Math.abs(dx) - 5), 5);
+ var height = dx ? 5 : Math.max(Math.min(25, Math.abs(dy) - 5), 5);
+
+ vertex.classed(dy ? 'cursor-ew-resize' : 'cursor-ns-resize', true)
+ .attr('width', width)
+ .attr('height', height)
+ .attr('x', x - width / 2)
+ .attr('y', y - height / 2)
+ .attr('transform', strTranslate(dx / 2, dy / 2));
+ } else {
+ vertex.classed('cursor-grab', true)
+ .attr('r', 5)
+ .attr('cx', x)
+ .attr('cy', y);
+ }
+
+ vertexDragOptions[i][j] = {
+ element: vertex.node(),
+ gd: gd,
+ prepFn: startDragVertex,
+ doneFn: endDragVertexController,
+ clickFn: clickVertexController
+ };
+
+ dragElement.init(vertexDragOptions[i][j]);
+ }
+ }
+ }
+
+ function moveGroup(dx, dy) {
+ if(!polygons.length) return;
+
+ for(var i = 0; i < polygons.length; i++) {
+ for(var j = 0; j < polygons[i].length; j++) {
+ for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
+ polygons[i][j][k + 1] = copyPolygons[i][j][k + 1] + dx;
+ polygons[i][j][k + 2] = copyPolygons[i][j][k + 2] + dy;
+ }
+ }
+ }
+ }
+
+ function moveGroupController(dx, dy) {
+ moveGroup(dx, dy);
+
+ redraw();
+ }
+
+ function startDragGroupController(evt) {
+ indexI = +evt.srcElement.getAttribute('data-i');
+ if(!indexI) indexI = 0; // ensure non-existing move button get zero index
+
+ groupDragOptions[indexI].moveFn = moveGroupController;
+ }
+
+ function endDragGroupController() {
+ update();
+ }
+
+ function clickGroupController(numClicks) {
+ if(numClicks === 2) {
+ eraseActiveSelection(gd);
+ }
+ }
+
+ function addGroupControllers() {
+ groupDragOptions = [];
+
+ if(!polygons.length) return;
+
+ var i = 0;
+ groupDragOptions[i] = {
+ element: outlines[0][0],
+ gd: gd,
+ prepFn: startDragGroupController,
+ doneFn: endDragGroupController,
+ clickFn: clickGroupController
+ };
+
+ dragElement.init(groupDragOptions[i]);
+ }
+};
+
+function recordPositions(polygonsOut, polygonsIn) {
+ for(var i = 0; i < polygonsIn.length; i++) {
+ var cell = polygonsIn[i];
+ polygonsOut[i] = [];
+ for(var j = 0; j < cell.length; j++) {
+ polygonsOut[i][j] = [];
+ for(var k = 0; k < cell[j].length; k++) {
+ polygonsOut[i][j][k] = cell[j][k];
+ }
+ }
+ }
+ return polygonsOut;
+}
+
+function getNextPoint(cell, j) {
+ var x = cell[j][1];
+ var y = cell[j][2];
+ var len = cell.length;
+ var nextJ, nextX, nextY;
+ nextJ = (j + 1) % len;
+ nextX = cell[nextJ][1];
+ nextY = cell[nextJ][2];
+
+ // avoid potential double points (closing points)
+ if(nextX === x && nextY === y) {
+ nextJ = (j + 2) % len;
+ nextX = cell[nextJ][1];
+ nextY = cell[nextJ][2];
+ }
+
+ return [nextJ, nextX, nextY];
+}
+
+function eraseActiveSelection(gd) {
+ // Do not allow removal of selections on other dragmodes.
+ // This ensures the user could still double click to
+ // deselect all trace.selectedpoints,
+ // if that's what they wanted.
+ // Also double click to zoom back won't result in
+ // any surprising selection removal.
+ if(!selectMode(gd._fullLayout.dragmode)) return;
+
+ clearOutlineControllers(gd);
+
+ var id = gd._fullLayout._activeSelectionIndex;
+ var selections = (gd.layout || {}).selections || [];
+ if(id < selections.length) {
+ var list = [];
+ for(var q = 0; q < selections.length; q++) {
+ if(q !== id) {
+ list.push(selections[q]);
+ }
+ }
+
+ delete gd._fullLayout._activeSelectionIndex;
+
+ var erasedSelection = gd._fullLayout.selections[id];
+ gd._fullLayout._deselect = {
+ xref: erasedSelection.xref,
+ yref: erasedSelection.yref
+ };
+
+ Registry.call('_guiRelayout', gd, {
+ selections: list
+ });
+ }
+}
+
+},{"../../lib":299,"../../registry":387,"../color":158,"../dragelement":177,"../dragelement/helpers":176,"../selections/draw_newselection/newselections":244,"./draw_newshape/constants":255,"./draw_newshape/helpers":257,"./draw_newshape/newshapes":258,"./handle_outline":259}],253:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -45462,9 +48069,9 @@ var Lib = _dereq_('../../lib');
var Axes = _dereq_('../../plots/cartesian/axes');
var readPaths = _dereq_('./draw_newshape/helpers').readPaths;
-var displayOutlines = _dereq_('./draw_newshape/display_outlines');
+var displayOutlines = _dereq_('./display_outlines');
-var clearOutlineControllers = _dereq_('../../plots/cartesian/handle_outline').clearOutlineControllers;
+var clearOutlineControllers = _dereq_('./handle_outline').clearOutlineControllers;
var Color = _dereq_('../color');
var Drawing = _dereq_('../drawing');
@@ -45475,6 +48082,7 @@ var setCursor = _dereq_('../../lib/setcursor');
var constants = _dereq_('./constants');
var helpers = _dereq_('./helpers');
+var getPathString = helpers.getPathString;
// Shapes are stored in gd.layout.shapes, an array of objects
@@ -45515,7 +48123,7 @@ function draw(gd) {
}
function shouldSkipEdits(gd) {
- return !!gd._fullLayout._drawing;
+ return !!gd._fullLayout._outlining;
}
function couldHaveActiveShape(gd) {
@@ -45530,7 +48138,7 @@ function drawOne(gd, index) {
.selectAll('.shapelayer [data-index="' + index + '"]')
.remove();
- var o = helpers.makeOptionsAndPlotinfo(gd, index);
+ var o = helpers.makeShapesOptionsAndPlotinfo(gd, index);
var options = o.options;
var plotinfo = o.plotinfo;
@@ -46035,115 +48643,6 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer, editHe
}
}
-function getPathString(gd, options) {
- var type = options.type;
- var xRefType = Axes.getRefType(options.xref);
- var yRefType = Axes.getRefType(options.yref);
- var xa = Axes.getFromId(gd, options.xref);
- var ya = Axes.getFromId(gd, options.yref);
- var gs = gd._fullLayout._size;
- var x2r, x2p, y2r, y2p;
- var x0, x1, y0, y1;
-
- if(xa) {
- if(xRefType === 'domain') {
- x2p = function(v) { return xa._offset + xa._length * v; };
- } else {
- x2r = helpers.shapePositionToRange(xa);
- x2p = function(v) { return xa._offset + xa.r2p(x2r(v, true)); };
- }
- } else {
- x2p = function(v) { return gs.l + gs.w * v; };
- }
-
- if(ya) {
- if(yRefType === 'domain') {
- y2p = function(v) { return ya._offset + ya._length * (1 - v); };
- } else {
- y2r = helpers.shapePositionToRange(ya);
- y2p = function(v) { return ya._offset + ya.r2p(y2r(v, true)); };
- }
- } else {
- y2p = function(v) { return gs.t + gs.h * (1 - v); };
- }
-
- if(type === 'path') {
- if(xa && xa.type === 'date') x2p = helpers.decodeDate(x2p);
- if(ya && ya.type === 'date') y2p = helpers.decodeDate(y2p);
- return convertPath(options, x2p, y2p);
- }
-
- if(options.xsizemode === 'pixel') {
- var xAnchorPos = x2p(options.xanchor);
- x0 = xAnchorPos + options.x0;
- x1 = xAnchorPos + options.x1;
- } else {
- x0 = x2p(options.x0);
- x1 = x2p(options.x1);
- }
-
- if(options.ysizemode === 'pixel') {
- var yAnchorPos = y2p(options.yanchor);
- y0 = yAnchorPos - options.y0;
- y1 = yAnchorPos - options.y1;
- } else {
- y0 = y2p(options.y0);
- y1 = y2p(options.y1);
- }
-
- if(type === 'line') return 'M' + x0 + ',' + y0 + 'L' + x1 + ',' + y1;
- if(type === 'rect') return 'M' + x0 + ',' + y0 + 'H' + x1 + 'V' + y1 + 'H' + x0 + 'Z';
-
- // circle
- var cx = (x0 + x1) / 2;
- var cy = (y0 + y1) / 2;
- var rx = Math.abs(cx - x0);
- var ry = Math.abs(cy - y0);
- var rArc = 'A' + rx + ',' + ry;
- var rightPt = (cx + rx) + ',' + cy;
- var topPt = cx + ',' + (cy - ry);
- return 'M' + rightPt + rArc + ' 0 1,1 ' + topPt +
- rArc + ' 0 0,1 ' + rightPt + 'Z';
-}
-
-
-function convertPath(options, x2p, y2p) {
- var pathIn = options.path;
- var xSizemode = options.xsizemode;
- var ySizemode = options.ysizemode;
- var xAnchor = options.xanchor;
- var yAnchor = options.yanchor;
-
- return pathIn.replace(constants.segmentRE, function(segment) {
- var paramNumber = 0;
- var segmentType = segment.charAt(0);
- var xParams = constants.paramIsX[segmentType];
- var yParams = constants.paramIsY[segmentType];
- var nParams = constants.numParams[segmentType];
-
- var paramString = segment.substr(1).replace(constants.paramRE, function(param) {
- if(xParams[paramNumber]) {
- if(xSizemode === 'pixel') param = x2p(xAnchor) + Number(param);
- else param = x2p(param);
- } else if(yParams[paramNumber]) {
- if(ySizemode === 'pixel') param = y2p(yAnchor) - Number(param);
- else param = y2p(param);
- }
- paramNumber++;
-
- if(paramNumber > nParams) param = 'X';
- return param;
- });
-
- if(paramNumber > nParams) {
- paramString = paramString.replace(/[\s,]*X.*/, '');
- Lib.log('Ignoring extra params in segment ' + segment);
- }
-
- return segmentType + paramString;
- });
-}
-
function movePath(pathIn, moveX, moveY) {
return pathIn.replace(constants.segmentRE, function(segment) {
var paramNumber = 0;
@@ -46204,22 +48703,22 @@ function eraseActiveShape(gd) {
var id = gd._fullLayout._activeShapeIndex;
var shapes = (gd.layout || {}).shapes || [];
if(id < shapes.length) {
- var newShapes = [];
+ var list = [];
for(var q = 0; q < shapes.length; q++) {
if(q !== id) {
- newShapes.push(shapes[q]);
+ list.push(shapes[q]);
}
}
delete gd._fullLayout._activeShapeIndex;
Registry.call('_guiRelayout', gd, {
- shapes: newShapes
+ shapes: list
});
}
}
-},{"../../lib":287,"../../lib/setcursor":307,"../../plot_api/plot_template":323,"../../plots/cartesian/axes":334,"../../plots/cartesian/handle_outline":345,"../../registry":378,"../color":157,"../dragelement":176,"../drawing":179,"./constants":239,"./draw_newshape/display_outlines":245,"./draw_newshape/helpers":246,"./helpers":248}],242:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../lib/setcursor":319,"../../plot_api/plot_template":335,"../../plots/cartesian/axes":346,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"./constants":250,"./display_outlines":252,"./draw_newshape/helpers":257,"./handle_outline":259,"./helpers":260}],254:[function(_dereq_,module,exports){
'use strict';
var dash = _dereq_('../../drawing/attributes').dash;
@@ -46295,7 +48794,7 @@ module.exports = {
}
};
-},{"../../../lib/extend":281,"../../drawing/attributes":178}],243:[function(_dereq_,module,exports){
+},{"../../../lib/extend":293,"../../drawing/attributes":179}],255:[function(_dereq_,module,exports){
'use strict';
var CIRCLE_SIDES = 32; // should be divisible by 4
@@ -46311,7 +48810,7 @@ module.exports = {
SQRT2: Math.sqrt(2)
};
-},{}],244:[function(_dereq_,module,exports){
+},{}],256:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../color');
@@ -46334,293 +48833,7 @@ module.exports = function supplyDrawNewShapeDefaults(layoutIn, layoutOut, coerce
coerce('activeshape.opacity');
};
-},{"../../color":157}],245:[function(_dereq_,module,exports){
-'use strict';
-
-var dragElement = _dereq_('../../dragelement');
-var dragHelpers = _dereq_('../../dragelement/helpers');
-var drawMode = dragHelpers.drawMode;
-
-var Registry = _dereq_('../../../registry');
-
-var constants = _dereq_('./constants');
-var i000 = constants.i000;
-var i090 = constants.i090;
-var i180 = constants.i180;
-var i270 = constants.i270;
-
-var handleOutline = _dereq_('../../../plots/cartesian/handle_outline');
-var clearOutlineControllers = handleOutline.clearOutlineControllers;
-
-var helpers = _dereq_('./helpers');
-var pointsShapeRectangle = helpers.pointsShapeRectangle;
-var pointsShapeEllipse = helpers.pointsShapeEllipse;
-var writePaths = helpers.writePaths;
-var newShapes = _dereq_('./newshapes');
-
-module.exports = function displayOutlines(polygons, outlines, dragOptions, nCalls) {
- if(!nCalls) nCalls = 0;
-
- var gd = dragOptions.gd;
-
- function redraw() {
- // recursive call
- displayOutlines(polygons, outlines, dragOptions, nCalls++);
-
- if(pointsShapeEllipse(polygons[0])) {
- update({redrawing: true});
- }
- }
-
- function update(opts) {
- dragOptions.isActiveShape = false; // i.e. to disable controllers
-
- var updateObject = newShapes(outlines, dragOptions);
- if(Object.keys(updateObject).length) {
- Registry.call((opts || {}).redrawing ? 'relayout' : '_guiRelayout', gd, updateObject);
- }
- }
-
-
- var isActiveShape = dragOptions.isActiveShape;
- var fullLayout = gd._fullLayout;
- var zoomLayer = fullLayout._zoomlayer;
-
- var dragmode = dragOptions.dragmode;
- var isDrawMode = drawMode(dragmode);
-
- if(isDrawMode) gd._fullLayout._drawing = true;
- else if(gd._fullLayout._activeShapeIndex >= 0) clearOutlineControllers(gd);
-
- // make outline
- outlines.attr('d', writePaths(polygons));
-
- // add controllers
- var vertexDragOptions;
- var shapeDragOptions;
- var indexI; // cell index
- var indexJ; // vertex or cell-controller index
- var copyPolygons;
-
- if(isActiveShape && !nCalls) {
- copyPolygons = recordPositions([], polygons);
-
- var g = zoomLayer.append('g').attr('class', 'outline-controllers');
- addVertexControllers(g);
- addShapeControllers();
- }
-
- function startDragVertex(evt) {
- indexI = +evt.srcElement.getAttribute('data-i');
- indexJ = +evt.srcElement.getAttribute('data-j');
-
- vertexDragOptions[indexI][indexJ].moveFn = moveVertexController;
- }
-
- function moveVertexController(dx, dy) {
- if(!polygons.length) return;
-
- var x0 = copyPolygons[indexI][indexJ][1];
- var y0 = copyPolygons[indexI][indexJ][2];
-
- var cell = polygons[indexI];
- var len = cell.length;
- if(pointsShapeRectangle(cell)) {
- for(var q = 0; q < len; q++) {
- if(q === indexJ) continue;
-
- // move other corners of rectangle
- var pos = cell[q];
-
- if(pos[1] === cell[indexJ][1]) {
- pos[1] = x0 + dx;
- }
-
- if(pos[2] === cell[indexJ][2]) {
- pos[2] = y0 + dy;
- }
- }
- // move the corner
- cell[indexJ][1] = x0 + dx;
- cell[indexJ][2] = y0 + dy;
-
- if(!pointsShapeRectangle(cell)) {
- // reject result to rectangles with ensure areas
- for(var j = 0; j < len; j++) {
- for(var k = 0; k < cell[j].length; k++) {
- cell[j][k] = copyPolygons[indexI][j][k];
- }
- }
- }
- } else { // other polylines
- cell[indexJ][1] = x0 + dx;
- cell[indexJ][2] = y0 + dy;
- }
-
- redraw();
- }
-
- function endDragVertexController() {
- update();
- }
-
- function removeVertex() {
- if(!polygons.length) return;
- if(!polygons[indexI]) return;
- if(!polygons[indexI].length) return;
-
- var newPolygon = [];
- for(var j = 0; j < polygons[indexI].length; j++) {
- if(j !== indexJ) {
- newPolygon.push(
- polygons[indexI][j]
- );
- }
- }
-
- if(newPolygon.length > 1 && !(
- newPolygon.length === 2 && newPolygon[1][0] === 'Z')
- ) {
- if(indexJ === 0) {
- newPolygon[0][0] = 'M';
- }
-
- polygons[indexI] = newPolygon;
-
- redraw();
- update();
- }
- }
-
- function clickVertexController(numClicks, evt) {
- if(numClicks === 2) {
- indexI = +evt.srcElement.getAttribute('data-i');
- indexJ = +evt.srcElement.getAttribute('data-j');
-
- var cell = polygons[indexI];
- if(
- !pointsShapeRectangle(cell) &&
- !pointsShapeEllipse(cell)
- ) {
- removeVertex();
- }
- }
- }
-
- function addVertexControllers(g) {
- vertexDragOptions = [];
-
- for(var i = 0; i < polygons.length; i++) {
- var cell = polygons[i];
-
- var onRect = pointsShapeRectangle(cell);
- var onEllipse = !onRect && pointsShapeEllipse(cell);
-
- vertexDragOptions[i] = [];
- for(var j = 0; j < cell.length; j++) {
- if(cell[j][0] === 'Z') continue;
-
- if(onEllipse &&
- j !== i000 &&
- j !== i090 &&
- j !== i180 &&
- j !== i270
- ) {
- continue;
- }
-
- var x = cell[j][1];
- var y = cell[j][2];
-
- var vertex = g.append('circle')
- .classed('cursor-grab', true)
- .attr('data-i', i)
- .attr('data-j', j)
- .attr('cx', x)
- .attr('cy', y)
- .attr('r', 4)
- .style({
- 'mix-blend-mode': 'luminosity',
- fill: 'black',
- stroke: 'white',
- 'stroke-width': 1
- });
-
- vertexDragOptions[i][j] = {
- element: vertex.node(),
- gd: gd,
- prepFn: startDragVertex,
- doneFn: endDragVertexController,
- clickFn: clickVertexController
- };
-
- dragElement.init(vertexDragOptions[i][j]);
- }
- }
- }
-
- function moveShape(dx, dy) {
- if(!polygons.length) return;
-
- for(var i = 0; i < polygons.length; i++) {
- for(var j = 0; j < polygons[i].length; j++) {
- for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
- polygons[i][j][k + 1] = copyPolygons[i][j][k + 1] + dx;
- polygons[i][j][k + 2] = copyPolygons[i][j][k + 2] + dy;
- }
- }
- }
- }
-
- function moveShapeController(dx, dy) {
- moveShape(dx, dy);
-
- redraw();
- }
-
- function startDragShapeController(evt) {
- indexI = +evt.srcElement.getAttribute('data-i');
- if(!indexI) indexI = 0; // ensure non-existing move button get zero index
-
- shapeDragOptions[indexI].moveFn = moveShapeController;
- }
-
- function endDragShapeController() {
- update();
- }
-
- function addShapeControllers() {
- shapeDragOptions = [];
-
- if(!polygons.length) return;
-
- var i = 0;
- shapeDragOptions[i] = {
- element: outlines[0][0],
- gd: gd,
- prepFn: startDragShapeController,
- doneFn: endDragShapeController
- };
-
- dragElement.init(shapeDragOptions[i]);
- }
-};
-
-function recordPositions(polygonsOut, polygonsIn) {
- for(var i = 0; i < polygonsIn.length; i++) {
- var cell = polygonsIn[i];
- polygonsOut[i] = [];
- for(var j = 0; j < cell.length; j++) {
- polygonsOut[i][j] = [];
- for(var k = 0; k < cell[j].length; k++) {
- polygonsOut[i][j][k] = cell[j][k];
- }
- }
- }
- return polygonsOut;
-}
-
-},{"../../../plots/cartesian/handle_outline":345,"../../../registry":378,"../../dragelement":176,"../../dragelement/helpers":175,"./constants":243,"./helpers":246,"./newshapes":247}],246:[function(_dereq_,module,exports){
+},{"../../color":158}],257:[function(_dereq_,module,exports){
'use strict';
var parseSvgPath = _dereq_('parse-svg-path');
@@ -46629,7 +48842,7 @@ var constants = _dereq_('./constants');
var CIRCLE_SIDES = constants.CIRCLE_SIDES;
var SQRT2 = constants.SQRT2;
-var cartesianHelpers = _dereq_('../../../plots/cartesian/helpers');
+var cartesianHelpers = _dereq_('../../selections/helpers');
var p2r = cartesianHelpers.p2r;
var r2p = cartesianHelpers.r2p;
@@ -46844,7 +49057,7 @@ function dist(a, b) {
);
}
-exports.pointsShapeRectangle = function(cell) {
+exports.pointsOnRectangle = function(cell) {
var len = cell.length;
if(len !== 5) return false;
@@ -46872,7 +49085,7 @@ exports.pointsShapeRectangle = function(cell) {
);
};
-exports.pointsShapeEllipse = function(cell) {
+exports.pointsOnEllipse = function(cell) {
var len = cell.length;
if(len !== CIRCLE_SIDES + 1) return false;
@@ -46949,7 +49162,24 @@ exports.ellipseOver = function(pos) {
};
};
-},{"../../../plots/cartesian/helpers":346,"./constants":243,"parse-svg-path":74}],247:[function(_dereq_,module,exports){
+exports.fixDatesForPaths = function(polygons, xaxis, yaxis) {
+ var xIsDate = xaxis.type === 'date';
+ var yIsDate = yaxis.type === 'date';
+ if(!xIsDate && !yIsDate) return polygons;
+
+ for(var i = 0; i < polygons.length; i++) {
+ for(var j = 0; j < polygons[i].length; j++) {
+ for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
+ if(xIsDate) polygons[i][j][k + 1] = polygons[i][j][k + 1].replace(' ', '_');
+ if(yIsDate) polygons[i][j][k + 2] = polygons[i][j][k + 2].replace(' ', '_');
+ }
+ }
+ }
+
+ return polygons;
+};
+
+},{"../../selections/helpers":245,"./constants":255,"parse-svg-path":74}],258:[function(_dereq_,module,exports){
'use strict';
var dragHelpers = _dereq_('../../dragelement/helpers');
@@ -46964,18 +49194,18 @@ var i270 = constants.i270;
var cos45 = constants.cos45;
var sin45 = constants.sin45;
-var cartesianHelpers = _dereq_('../../../plots/cartesian/helpers');
+var cartesianHelpers = _dereq_('../../selections/helpers');
var p2r = cartesianHelpers.p2r;
var r2p = cartesianHelpers.r2p;
-var handleOutline = _dereq_('../../../plots/cartesian/handle_outline');
-var clearSelect = handleOutline.clearSelect;
+var handleOutline = _dereq_('.././handle_outline');
+var clearOutline = handleOutline.clearOutline;
var helpers = _dereq_('./helpers');
var readPaths = helpers.readPaths;
var writePaths = helpers.writePaths;
var ellipseOver = helpers.ellipseOver;
-
+var fixDatesForPaths = helpers.fixDatesForPaths;
module.exports = function newShapes(outlines, dragOptions) {
if(!outlines.length) return;
@@ -46984,7 +49214,7 @@ module.exports = function newShapes(outlines, dragOptions) {
var d = e.getAttribute('d');
var gd = dragOptions.gd;
- var drwStyle = gd._fullLayout.newshape;
+ var newStyle = gd._fullLayout.newshape;
var plotinfo = dragOptions.plotinfo;
var xaxis = plotinfo.xaxis;
@@ -47032,18 +49262,18 @@ module.exports = function newShapes(outlines, dragOptions) {
xref: xPaper ? 'paper' : xaxis._id,
yref: yPaper ? 'paper' : yaxis._id,
- layer: drwStyle.layer,
- opacity: drwStyle.opacity,
+ layer: newStyle.layer,
+ opacity: newStyle.opacity,
line: {
- color: drwStyle.line.color,
- width: drwStyle.line.width,
- dash: drwStyle.line.dash
+ color: newStyle.line.color,
+ width: newStyle.line.width,
+ dash: newStyle.line.dash
}
};
if(!isOpenMode) {
- newShape.fillcolor = drwStyle.fillcolor;
- newShape.fillrule = drwStyle.fillrule;
+ newShape.fillcolor = newStyle.fillcolor;
+ newShape.fillrule = newStyle.fillrule;
}
var cell;
@@ -47053,6 +49283,7 @@ module.exports = function newShapes(outlines, dragOptions) {
if(
cell &&
+ cell.length === 5 && // ensure we only have 4 corners for a rect
dragmode === 'drawrect'
) {
newShape.type = 'rect';
@@ -47141,7 +49372,7 @@ module.exports = function newShapes(outlines, dragOptions) {
cell = null;
}
- clearSelect(gd);
+ clearOutline(gd);
var editHelpers = dragOptions.editHelpers;
var modifyItem = (editHelpers || {}).modifyItem;
@@ -47182,29 +49413,40 @@ module.exports = function newShapes(outlines, dragOptions) {
return editHelpers ? editHelpers.getUpdateObj() : {};
};
-function fixDatesForPaths(polygons, xaxis, yaxis) {
- var xIsDate = xaxis.type === 'date';
- var yIsDate = yaxis.type === 'date';
- if(!xIsDate && !yIsDate) return polygons;
+},{"../../dragelement/helpers":176,"../../selections/helpers":245,".././handle_outline":259,"./constants":255,"./helpers":257}],259:[function(_dereq_,module,exports){
+'use strict';
- for(var i = 0; i < polygons.length; i++) {
- for(var j = 0; j < polygons[i].length; j++) {
- for(var k = 0; k + 2 < polygons[i][j].length; k += 2) {
- if(xIsDate) polygons[i][j][k + 1] = polygons[i][j][k + 1].replace(' ', '_');
- if(yIsDate) polygons[i][j][k + 2] = polygons[i][j][k + 2].replace(' ', '_');
- }
- }
+function clearOutlineControllers(gd) {
+ var zoomLayer = gd._fullLayout._zoomlayer;
+ if(zoomLayer) {
+ zoomLayer.selectAll('.outline-controllers').remove();
}
-
- return polygons;
}
-},{"../../../plots/cartesian/handle_outline":345,"../../../plots/cartesian/helpers":346,"../../dragelement/helpers":175,"./constants":243,"./helpers":246}],248:[function(_dereq_,module,exports){
+function clearOutline(gd) {
+ var zoomLayer = gd._fullLayout._zoomlayer;
+ if(zoomLayer) {
+ // until we get around to persistent selections, remove the outline
+ // here. The selection itself will be removed when the plot redraws
+ // at the end.
+ zoomLayer.selectAll('.select-outline').remove();
+ }
+
+ gd._fullLayout._outlining = false;
+}
+
+module.exports = {
+ clearOutlineControllers: clearOutlineControllers,
+ clearOutline: clearOutline
+};
+
+},{}],260:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
var Lib = _dereq_('../../lib');
+var Axes = _dereq_('../../plots/cartesian/axes');
// special position conversion functions... category axis positions can't be
// specified by their data values, because they don't make a continuous mapping.
@@ -47234,7 +49476,7 @@ exports.encodeDate = function(convertToDate) {
return function(v) { return convertToDate(v).replace(' ', '_'); };
};
-exports.extractPathCoords = function(path, paramsToUse) {
+exports.extractPathCoords = function(path, paramsToUse, isRaw) {
var extractedCoordinates = [];
var segments = path.match(constants.segmentRE);
@@ -47245,7 +49487,10 @@ exports.extractPathCoords = function(path, paramsToUse) {
var params = segment.substr(1).match(constants.paramRE);
if(!params || params.length < relevantParamIdx) return;
- extractedCoordinates.push(Lib.cleanNumber(params[relevantParamIdx]));
+ var str = params[relevantParamIdx];
+ var pos = isRaw ? str : Lib.cleanNumber(str);
+
+ extractedCoordinates.push(pos);
});
return extractedCoordinates;
@@ -47324,7 +49569,7 @@ exports.roundPositionForSharpStrokeRendering = function(pos, strokeWidth) {
return strokeWidthIsOdd ? posValAsInt + 0.5 : posValAsInt;
};
-exports.makeOptionsAndPlotinfo = function(gd, index) {
+exports.makeShapesOptionsAndPlotinfo = function(gd, index) {
var options = gd._fullLayout.shapes[index] || {};
var plotinfo = gd._fullLayout._plots[options.xref + options.yref];
@@ -47348,7 +49593,137 @@ exports.makeOptionsAndPlotinfo = function(gd, index) {
};
};
-},{"../../lib":287,"./constants":239}],249:[function(_dereq_,module,exports){
+// TODO: move to selections helpers?
+exports.makeSelectionsOptionsAndPlotinfo = function(gd, index) {
+ var options = gd._fullLayout.selections[index] || {};
+
+ var plotinfo = gd._fullLayout._plots[options.xref + options.yref];
+ var hasPlotinfo = !!plotinfo;
+ if(hasPlotinfo) {
+ plotinfo._hadPlotinfo = true;
+ } else {
+ plotinfo = {};
+ if(options.xref) plotinfo.xaxis = gd._fullLayout[options.xref + 'axis'];
+ if(options.yref) plotinfo.yaxis = gd._fullLayout[options.yref + 'axis'];
+ }
+
+ return {
+ options: options,
+ plotinfo: plotinfo
+ };
+};
+
+
+exports.getPathString = function(gd, options) {
+ var type = options.type;
+ var xRefType = Axes.getRefType(options.xref);
+ var yRefType = Axes.getRefType(options.yref);
+ var xa = Axes.getFromId(gd, options.xref);
+ var ya = Axes.getFromId(gd, options.yref);
+ var gs = gd._fullLayout._size;
+ var x2r, x2p, y2r, y2p;
+ var x0, x1, y0, y1;
+
+ if(xa) {
+ if(xRefType === 'domain') {
+ x2p = function(v) { return xa._offset + xa._length * v; };
+ } else {
+ x2r = exports.shapePositionToRange(xa);
+ x2p = function(v) { return xa._offset + xa.r2p(x2r(v, true)); };
+ }
+ } else {
+ x2p = function(v) { return gs.l + gs.w * v; };
+ }
+
+ if(ya) {
+ if(yRefType === 'domain') {
+ y2p = function(v) { return ya._offset + ya._length * (1 - v); };
+ } else {
+ y2r = exports.shapePositionToRange(ya);
+ y2p = function(v) { return ya._offset + ya.r2p(y2r(v, true)); };
+ }
+ } else {
+ y2p = function(v) { return gs.t + gs.h * (1 - v); };
+ }
+
+ if(type === 'path') {
+ if(xa && xa.type === 'date') x2p = exports.decodeDate(x2p);
+ if(ya && ya.type === 'date') y2p = exports.decodeDate(y2p);
+ return convertPath(options, x2p, y2p);
+ }
+
+ if(options.xsizemode === 'pixel') {
+ var xAnchorPos = x2p(options.xanchor);
+ x0 = xAnchorPos + options.x0;
+ x1 = xAnchorPos + options.x1;
+ } else {
+ x0 = x2p(options.x0);
+ x1 = x2p(options.x1);
+ }
+
+ if(options.ysizemode === 'pixel') {
+ var yAnchorPos = y2p(options.yanchor);
+ y0 = yAnchorPos - options.y0;
+ y1 = yAnchorPos - options.y1;
+ } else {
+ y0 = y2p(options.y0);
+ y1 = y2p(options.y1);
+ }
+
+ if(type === 'line') return 'M' + x0 + ',' + y0 + 'L' + x1 + ',' + y1;
+ if(type === 'rect') return 'M' + x0 + ',' + y0 + 'H' + x1 + 'V' + y1 + 'H' + x0 + 'Z';
+
+ // circle
+ var cx = (x0 + x1) / 2;
+ var cy = (y0 + y1) / 2;
+ var rx = Math.abs(cx - x0);
+ var ry = Math.abs(cy - y0);
+ var rArc = 'A' + rx + ',' + ry;
+ var rightPt = (cx + rx) + ',' + cy;
+ var topPt = cx + ',' + (cy - ry);
+ return 'M' + rightPt + rArc + ' 0 1,1 ' + topPt +
+ rArc + ' 0 0,1 ' + rightPt + 'Z';
+};
+
+
+function convertPath(options, x2p, y2p) {
+ var pathIn = options.path;
+ var xSizemode = options.xsizemode;
+ var ySizemode = options.ysizemode;
+ var xAnchor = options.xanchor;
+ var yAnchor = options.yanchor;
+
+ return pathIn.replace(constants.segmentRE, function(segment) {
+ var paramNumber = 0;
+ var segmentType = segment.charAt(0);
+ var xParams = constants.paramIsX[segmentType];
+ var yParams = constants.paramIsY[segmentType];
+ var nParams = constants.numParams[segmentType];
+
+ var paramString = segment.substr(1).replace(constants.paramRE, function(param) {
+ if(xParams[paramNumber]) {
+ if(xSizemode === 'pixel') param = x2p(xAnchor) + Number(param);
+ else param = x2p(param);
+ } else if(yParams[paramNumber]) {
+ if(ySizemode === 'pixel') param = y2p(yAnchor) - Number(param);
+ else param = y2p(param);
+ }
+ paramNumber++;
+
+ if(paramNumber > nParams) param = 'X';
+ return param;
+ });
+
+ if(paramNumber > nParams) {
+ paramString = paramString.replace(/[\s,]*X.*/, '');
+ Lib.log('Ignoring extra params in segment ' + segment);
+ }
+
+ return segmentType + paramString;
+ });
+}
+
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":250}],261:[function(_dereq_,module,exports){
'use strict';
var drawModule = _dereq_('./draw');
@@ -47367,7 +49742,7 @@ module.exports = {
drawOne: drawModule.drawOne
};
-},{"../../plots/cartesian/include_components":347,"./attributes":237,"./calc_autorange":238,"./defaults":240,"./draw":241,"./draw_newshape/defaults":244}],250:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/include_components":357,"./attributes":248,"./calc_autorange":249,"./defaults":251,"./draw":253,"./draw_newshape/defaults":256}],262:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -47541,7 +49916,7 @@ module.exports = overrideAll(templatedArray('slider', {
}
}), 'arraydraw', 'from-root');
-},{"../../lib/extend":281,"../../plot_api/edit_types":316,"../../plot_api/plot_template":323,"../../plots/animation_attributes":328,"../../plots/font_attributes":365,"../../plots/pad_attributes":370,"./constants":251}],251:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../plots/animation_attributes":340,"../../plots/font_attributes":374,"../../plots/pad_attributes":379,"./constants":263}],263:[function(_dereq_,module,exports){
'use strict';
@@ -47626,7 +50001,7 @@ module.exports = {
currentValueInset: 0,
};
-},{}],252:[function(_dereq_,module,exports){
+},{}],264:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -47733,7 +50108,7 @@ function stepDefaults(valueIn, valueOut) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"./attributes":250,"./constants":251}],253:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"./attributes":262,"./constants":263}],265:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -48367,7 +50742,7 @@ function drawRail(sliderGroup, sliderOpts) {
);
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/svg_text_utils":310,"../../plot_api/plot_template":323,"../../plots/plots":371,"../color":157,"../drawing":179,"./constants":251,"@plotly/d3":20}],254:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/plots":380,"../color":158,"../drawing":180,"./constants":263,"@plotly/d3":20}],266:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -48382,7 +50757,7 @@ module.exports = {
draw: _dereq_('./draw')
};
-},{"./attributes":250,"./constants":251,"./defaults":252,"./draw":253}],255:[function(_dereq_,module,exports){
+},{"./attributes":262,"./constants":263,"./defaults":264,"./draw":265}],267:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -48647,7 +51022,7 @@ module.exports = {
draw: draw
};
-},{"../../constants/alignment":262,"../../constants/interactions":266,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../../registry":378,"../color":157,"../drawing":179,"@plotly/d3":20,"fast-isnumeric":33}],256:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../constants/interactions":278,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"../color":158,"../drawing":180,"@plotly/d3":20,"fast-isnumeric":33}],268:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../../plots/font_attributes');
@@ -48770,7 +51145,7 @@ module.exports = overrideAll(templatedArray('updatemenu', {
}
}), 'arraydraw', 'from-root');
-},{"../../lib/extend":281,"../../plot_api/edit_types":316,"../../plot_api/plot_template":323,"../../plots/font_attributes":365,"../../plots/pad_attributes":370,"../color/attributes":156}],257:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../plots/font_attributes":374,"../../plots/pad_attributes":379,"../color/attributes":157}],269:[function(_dereq_,module,exports){
'use strict';
@@ -48842,7 +51217,7 @@ module.exports = {
}
};
-},{}],258:[function(_dereq_,module,exports){
+},{}],270:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -48917,7 +51292,7 @@ function buttonDefaults(buttonIn, buttonOut) {
}
}
-},{"../../lib":287,"../../plots/array_container_defaults":329,"./attributes":256,"./constants":257}],259:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/array_container_defaults":341,"./attributes":268,"./constants":269}],271:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -49559,9 +51934,9 @@ function removeAllButtons(gButton, newMenuIndexAttr) {
.selectAll('g.' + constants.dropdownButtonClassName).remove();
}
-},{"../../constants/alignment":262,"../../lib":287,"../../lib/svg_text_utils":310,"../../plot_api/plot_template":323,"../../plots/plots":371,"../color":157,"../drawing":179,"./constants":257,"./scrollbox":261,"@plotly/d3":20}],260:[function(_dereq_,module,exports){
-arguments[4][254][0].apply(exports,arguments)
-},{"./attributes":256,"./constants":257,"./defaults":258,"./draw":259,"dup":254}],261:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/plots":380,"../color":158,"../drawing":180,"./constants":269,"./scrollbox":273,"@plotly/d3":20}],272:[function(_dereq_,module,exports){
+arguments[4][266][0].apply(exports,arguments)
+},{"./attributes":268,"./constants":269,"./defaults":270,"./draw":271,"dup":266}],273:[function(_dereq_,module,exports){
'use strict';
module.exports = ScrollBox;
@@ -50018,7 +52393,7 @@ ScrollBox.prototype.setTranslate = function setTranslate(translateX, translateY)
}
};
-},{"../../lib":287,"../color":157,"../drawing":179,"@plotly/d3":20}],262:[function(_dereq_,module,exports){
+},{"../../lib":299,"../color":158,"../drawing":180,"@plotly/d3":20}],274:[function(_dereq_,module,exports){
'use strict';
// fraction of some size to get to a named position
@@ -50075,7 +52450,7 @@ module.exports = {
}
};
-},{}],263:[function(_dereq_,module,exports){
+},{}],275:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50098,7 +52473,7 @@ module.exports = {
}
};
-},{}],264:[function(_dereq_,module,exports){
+},{}],276:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50106,7 +52481,7 @@ module.exports = {
DATE_FORMAT_LINK: 'https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format'
};
-},{}],265:[function(_dereq_,module,exports){
+},{}],277:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50136,7 +52511,7 @@ module.exports = {
}
};
-},{}],266:[function(_dereq_,module,exports){
+},{}],278:[function(_dereq_,module,exports){
'use strict';
@@ -50151,7 +52526,7 @@ module.exports = {
DESELECTDIM: 0.2
};
-},{}],267:[function(_dereq_,module,exports){
+},{}],279:[function(_dereq_,module,exports){
'use strict';
@@ -50216,7 +52591,7 @@ module.exports = {
MINUS_SIGN: '\u2212'
};
-},{}],268:[function(_dereq_,module,exports){
+},{}],280:[function(_dereq_,module,exports){
'use strict';
@@ -50231,7 +52606,7 @@ exports.svgAttrs = {
'xmlns:xlink': exports.xlink
};
-},{}],269:[function(_dereq_,module,exports){
+},{}],281:[function(_dereq_,module,exports){
'use strict';
exports.version = _dereq_('./version').version;
@@ -50269,6 +52644,7 @@ register([
_dereq_('./components/fx'), // fx needs to come after legend
_dereq_('./components/annotations'),
_dereq_('./components/annotations3d'),
+ _dereq_('./components/selections'),
_dereq_('./components/shapes'),
_dereq_('./components/images'),
_dereq_('./components/updatemenus'),
@@ -50315,7 +52691,7 @@ exports.Fx = {
exports.Snapshot = _dereq_('./snapshot');
exports.PlotSchema = _dereq_('./plot_api/plot_schema');
-},{"../build/plotcss":1,"./components/annotations":148,"./components/annotations3d":153,"./components/colorbar":163,"./components/colorscale":169,"./components/errorbars":185,"./components/fx":197,"./components/grid":201,"./components/images":206,"./components/legend":214,"./components/modebar":220,"./components/rangeselector":228,"./components/rangeslider":235,"./components/shapes":249,"./components/sliders":254,"./components/updatemenus":260,"./fonts/ploticon":270,"./locale-en":314,"./locale-en-us":313,"./plot_api":318,"./plot_api/plot_schema":322,"./plots/plots":371,"./registry":378,"./snapshot":383,"./traces/scatter":512,"./version":552,"native-promise-only":72}],270:[function(_dereq_,module,exports){
+},{"../build/plotcss":1,"./components/annotations":149,"./components/annotations3d":154,"./components/colorbar":164,"./components/colorscale":170,"./components/errorbars":186,"./components/fx":198,"./components/grid":202,"./components/images":207,"./components/legend":215,"./components/modebar":221,"./components/rangeselector":229,"./components/rangeslider":236,"./components/selections":246,"./components/shapes":261,"./components/sliders":266,"./components/updatemenus":272,"./fonts/ploticon":282,"./locale-en":326,"./locale-en-us":325,"./plot_api":330,"./plot_api/plot_schema":334,"./plots/plots":380,"./registry":387,"./snapshot":392,"./traces/scatter":521,"./version":561,"native-promise-only":72}],282:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -50483,11 +52859,38 @@ module.exports = {
},
'newplotlylogo': {
'name': 'newplotlylogo',
- 'svg': ''
+ 'svg': [
+ ''
+ ].join('')
}
};
-},{}],271:[function(_dereq_,module,exports){
+},{}],283:[function(_dereq_,module,exports){
'use strict';
@@ -50542,7 +52945,7 @@ exports.isBottomAnchor = function isBottomAnchor(opts) {
);
};
-},{}],272:[function(_dereq_,module,exports){
+},{}],284:[function(_dereq_,module,exports){
'use strict';
var modModule = _dereq_('./mod');
@@ -50775,7 +53178,7 @@ module.exports = {
pathAnnulus: pathAnnulus
};
-},{"./mod":294}],273:[function(_dereq_,module,exports){
+},{"./mod":306}],285:[function(_dereq_,module,exports){
'use strict';
var isArray = Array.isArray;
@@ -50917,7 +53320,7 @@ function _rowLength(z, fn, len0) {
return 0;
}
-},{}],274:[function(_dereq_,module,exports){
+},{}],286:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -50941,7 +53344,7 @@ module.exports = function cleanNumber(v) {
return BADNUM;
};
-},{"../constants/numerical":267,"fast-isnumeric":33}],275:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"fast-isnumeric":33}],287:[function(_dereq_,module,exports){
'use strict';
/**
@@ -50961,7 +53364,7 @@ module.exports = function clearGlCanvases(gd) {
}
};
-},{}],276:[function(_dereq_,module,exports){
+},{}],288:[function(_dereq_,module,exports){
'use strict';
/**
@@ -50976,7 +53379,7 @@ module.exports = function clearResponsive(gd) {
}
};
-},{}],277:[function(_dereq_,module,exports){
+},{}],289:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -51107,14 +53510,14 @@ exports.valObjectMeta = {
},
flaglist: {
coerceFunction: function(v, propOut, dflt, opts) {
- if(typeof v !== 'string') {
- propOut.set(dflt);
- return;
- }
if((opts.extras || []).indexOf(v) !== -1) {
propOut.set(v);
return;
}
+ if(typeof v !== 'string') {
+ propOut.set(dflt);
+ return;
+ }
var vParts = v.split('+');
var i = 0;
while(i < vParts.length) {
@@ -51421,7 +53824,7 @@ function validate(value, opts) {
}
exports.validate = validate;
-},{"../components/color":157,"../components/colorscale/scales":172,"../constants/interactions":266,"../plots/attributes":330,"./array":273,"./mod":294,"./nested_property":295,"./regex":303,"fast-isnumeric":33,"tinycolor2":121}],278:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/colorscale/scales":173,"../constants/interactions":278,"../plots/attributes":342,"./array":285,"./mod":306,"./nested_property":307,"./regex":315,"fast-isnumeric":33,"tinycolor2":122}],290:[function(_dereq_,module,exports){
'use strict';
var timeFormat = _dereq_('d3-time-format').timeFormat;
@@ -52025,7 +54428,7 @@ exports.findExactDates = function(data, calendar) {
};
};
-},{"../constants/numerical":267,"../registry":378,"./loggers":291,"./mod":294,"d3-time-format":30,"fast-isnumeric":33}],279:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"../registry":387,"./loggers":303,"./mod":306,"d3-time-format":30,"fast-isnumeric":33}],291:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -52195,7 +54598,7 @@ module.exports = {
equalDomRects: equalDomRects
};
-},{"./loggers":291,"./matrix":293,"@plotly/d3":20,"gl-mat4":49}],280:[function(_dereq_,module,exports){
+},{"./loggers":303,"./matrix":305,"@plotly/d3":20,"gl-mat4":49}],292:[function(_dereq_,module,exports){
'use strict';
/* global jQuery:false */
@@ -52359,7 +54762,7 @@ var Events = {
module.exports = Events;
-},{"events":27}],281:[function(_dereq_,module,exports){
+},{"events":27}],293:[function(_dereq_,module,exports){
'use strict';
var isPlainObject = _dereq_('./is_plain_object.js');
@@ -52464,7 +54867,7 @@ function _extend(inputs, isDeep, keepAllKeys, noArrayCopies) {
return target;
}
-},{"./is_plain_object.js":288}],282:[function(_dereq_,module,exports){
+},{"./is_plain_object.js":300}],294:[function(_dereq_,module,exports){
'use strict';
@@ -52506,7 +54909,7 @@ module.exports = function filterUnique(array) {
return out;
};
-},{}],283:[function(_dereq_,module,exports){
+},{}],295:[function(_dereq_,module,exports){
'use strict';
/** Filter out object items with visible !== true
@@ -52546,7 +54949,7 @@ function isCalcData(cont) {
);
}
-},{}],284:[function(_dereq_,module,exports){
+},{}],296:[function(_dereq_,module,exports){
'use strict';
var mod = _dereq_('./mod').mod;
@@ -52782,7 +55185,7 @@ exports.findPointOnPath = function findPointOnPath(path, val, coord, opts) {
return pt;
};
-},{"./mod":294}],285:[function(_dereq_,module,exports){
+},{"./mod":306}],297:[function(_dereq_,module,exports){
'use strict';
// Simple helper functions
@@ -52790,7 +55193,7 @@ exports.findPointOnPath = function findPointOnPath(path, val, coord, opts) {
module.exports = function identity(d) { return d; };
-},{}],286:[function(_dereq_,module,exports){
+},{}],298:[function(_dereq_,module,exports){
'use strict';
module.exports = function incrementNumeric(x, delta) {
@@ -52823,7 +55226,7 @@ module.exports = function incrementNumeric(x, delta) {
return newX;
};
-},{}],287:[function(_dereq_,module,exports){
+},{}],299:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -54211,7 +56614,7 @@ lib.getPositionFromD3Event = function() {
}
};
-},{"../constants/numerical":267,"./anchor_utils":271,"./angles":272,"./array":273,"./clean_number":274,"./clear_responsive":276,"./coerce":277,"./dates":278,"./dom":279,"./extend":281,"./filter_unique":282,"./filter_visible":283,"./geometry2d":284,"./identity":285,"./increment":286,"./is_plain_object":288,"./keyed_container":289,"./localize":290,"./loggers":291,"./make_trace_groups":292,"./matrix":293,"./mod":294,"./nested_property":295,"./noop":296,"./notifier":297,"./preserve_drawing_buffer":300,"./push_unique":301,"./regex":303,"./relative_attr":304,"./relink_private":305,"./search":306,"./sort_object_keys":308,"./stats":309,"./throttle":311,"./to_log_range":312,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],288:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"./anchor_utils":283,"./angles":284,"./array":285,"./clean_number":286,"./clear_responsive":288,"./coerce":289,"./dates":290,"./dom":291,"./extend":293,"./filter_unique":294,"./filter_visible":295,"./geometry2d":296,"./identity":297,"./increment":298,"./is_plain_object":300,"./keyed_container":301,"./localize":302,"./loggers":303,"./make_trace_groups":304,"./matrix":305,"./mod":306,"./nested_property":307,"./noop":308,"./notifier":309,"./preserve_drawing_buffer":312,"./push_unique":313,"./regex":315,"./relative_attr":316,"./relink_private":317,"./search":318,"./sort_object_keys":320,"./stats":321,"./throttle":323,"./to_log_range":324,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],300:[function(_dereq_,module,exports){
'use strict';
// more info: http://stackoverflow.com/questions/18531624/isplainobject-thing
@@ -54230,7 +56633,7 @@ module.exports = function isPlainObject(obj) {
);
};
-},{}],289:[function(_dereq_,module,exports){
+},{}],301:[function(_dereq_,module,exports){
'use strict';
var nestedProperty = _dereq_('./nested_property');
@@ -54415,7 +56818,7 @@ module.exports = function keyedContainer(baseObj, path, keyName, valueName) {
return obj;
};
-},{"./nested_property":295}],290:[function(_dereq_,module,exports){
+},{"./nested_property":307}],302:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -54462,7 +56865,7 @@ module.exports = function localize(gd, s) {
return s;
};
-},{"../registry":378}],291:[function(_dereq_,module,exports){
+},{"../registry":387}],303:[function(_dereq_,module,exports){
'use strict';
/* eslint-disable no-console */
@@ -54539,7 +56942,7 @@ loggers.error = function() {
}
};
-},{"../plot_api/plot_config":321,"./notifier":297}],292:[function(_dereq_,module,exports){
+},{"../plot_api/plot_config":333,"./notifier":309}],304:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -54574,7 +56977,7 @@ module.exports = function makeTraceGroups(traceLayer, cdModule, cls) {
return traces;
};
-},{"@plotly/d3":20}],293:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],305:[function(_dereq_,module,exports){
'use strict';
var mat4X4 = _dereq_('gl-mat4');
@@ -54717,7 +57120,7 @@ exports.inverseTransformMatrix = function(m) {
];
};
-},{"gl-mat4":49}],294:[function(_dereq_,module,exports){
+},{"gl-mat4":49}],306:[function(_dereq_,module,exports){
'use strict';
/**
@@ -54744,7 +57147,7 @@ module.exports = {
modHalf: modHalf
};
-},{}],295:[function(_dereq_,module,exports){
+},{}],307:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -54981,7 +57384,7 @@ function badContainer(container, propStr, propParts) {
};
}
-},{"./array":273,"fast-isnumeric":33}],296:[function(_dereq_,module,exports){
+},{"./array":285,"fast-isnumeric":33}],308:[function(_dereq_,module,exports){
'use strict';
// Simple helper functions
@@ -54989,7 +57392,7 @@ function badContainer(container, propStr, propParts) {
module.exports = function noop() {};
-},{}],297:[function(_dereq_,module,exports){
+},{}],309:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -55068,7 +57471,7 @@ module.exports = function(text, displayLength) {
});
};
-},{"@plotly/d3":20,"fast-isnumeric":33}],298:[function(_dereq_,module,exports){
+},{"@plotly/d3":20,"fast-isnumeric":33}],310:[function(_dereq_,module,exports){
'use strict';
var setCursor = _dereq_('./setcursor');
@@ -55107,7 +57510,7 @@ module.exports = function overrideCursor(el3, csr) {
}
};
-},{"./setcursor":307}],299:[function(_dereq_,module,exports){
+},{"./setcursor":319}],311:[function(_dereq_,module,exports){
'use strict';
var dot = _dereq_('./matrix').dot;
@@ -55139,7 +57542,14 @@ polygon.tester = function tester(ptsIn) {
var ymax = ymin;
var i;
- pts.push(pts[0]);
+ if(
+ pts[pts.length - 1][0] !== pts[0][0] ||
+ pts[pts.length - 1][1] !== pts[0][1]
+ ) {
+ // close the polygon
+ pts.push(pts[0]);
+ }
+
for(i = 1; i < pts.length; i++) {
xmin = Math.min(xmin, pts[i][0]);
xmax = Math.max(xmax, pts[i][0]);
@@ -55350,7 +57760,7 @@ polygon.filter = function filter(pts, tolerance) {
};
};
-},{"../constants/numerical":267,"./matrix":293}],300:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"./matrix":305}],312:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -55412,7 +57822,7 @@ function getUserAgent() {
return ua;
}
-},{"fast-isnumeric":33,"is-mobile":69}],301:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33,"is-mobile":69}],313:[function(_dereq_,module,exports){
'use strict';
/**
@@ -55442,7 +57852,7 @@ module.exports = function pushUnique(array, item) {
return array;
};
-},{}],302:[function(_dereq_,module,exports){
+},{}],314:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -55634,7 +58044,7 @@ queue.plotDo = function(gd, func, args) {
module.exports = queue;
-},{"../lib":287,"../plot_api/plot_config":321}],303:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_config":333}],315:[function(_dereq_,module,exports){
'use strict';
/*
@@ -55656,7 +58066,7 @@ exports.counter = function(head, tail, openEnded, matchBeginning) {
return new RegExp(startWithPrefix + head + '([2-9]|[1-9][0-9]+)?' + fullTail);
};
-},{}],304:[function(_dereq_,module,exports){
+},{}],316:[function(_dereq_,module,exports){
'use strict';
// ASCEND: chop off the last nesting level - either [] or . - to ascend
@@ -55700,7 +58110,7 @@ module.exports = function(baseAttr, relativeAttr) {
return baseAttr + relativeAttr;
};
-},{}],305:[function(_dereq_,module,exports){
+},{}],317:[function(_dereq_,module,exports){
'use strict';
var isArrayOrTypedArray = _dereq_('./array').isArrayOrTypedArray;
@@ -55748,7 +58158,7 @@ module.exports = function relinkPrivateKeys(toContainer, fromContainer) {
}
};
-},{"./array":273,"./is_plain_object":288}],306:[function(_dereq_,module,exports){
+},{"./array":285,"./is_plain_object":300}],318:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -55940,7 +58350,7 @@ exports.findIndexOfMin = function(arr, fn) {
return ind;
};
-},{"../constants/numerical":267,"./identity":285,"./loggers":291,"fast-isnumeric":33}],307:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"./identity":297,"./loggers":303,"fast-isnumeric":33}],319:[function(_dereq_,module,exports){
'use strict';
// works with our CSS cursor classes (see css/_cursor.scss)
@@ -55954,14 +58364,14 @@ module.exports = function setCursor(el3, csr) {
if(csr) el3.classed('cursor-' + csr, true);
};
-},{}],308:[function(_dereq_,module,exports){
+},{}],320:[function(_dereq_,module,exports){
'use strict';
module.exports = function sortObjectKeys(obj) {
return Object.keys(obj).sort();
};
-},{}],309:[function(_dereq_,module,exports){
+},{}],321:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -56041,7 +58451,7 @@ exports.median = function(data) {
/**
* interp() computes a percentile (quantile) for a given distribution.
* We interpolate the distribution (to compute quantiles, we follow method #10 here:
- * http://www.amstat.org/publications/jse/v14n3/langford.html).
+ * http://jse.amstat.org/v14n3/langford.html).
* Typically the index or rank (n * arr.length) may be non-integer.
* For reference: ends are clipped to the extreme values in the array;
* For box plots: index you get is half a point too high (see
@@ -56062,7 +58472,7 @@ exports.interp = function(arr, n) {
return frac * arr[Math.ceil(n)] + (1 - frac) * arr[Math.floor(n)];
};
-},{"./array":273,"fast-isnumeric":33}],310:[function(_dereq_,module,exports){
+},{"./array":285,"fast-isnumeric":33}],322:[function(_dereq_,module,exports){
'use strict';
/* global MathJax:false */
@@ -57078,7 +59488,7 @@ exports.makeEditable = function(context, options) {
return d3.rebind(context, dispatch, 'on');
};
-},{"../constants/alignment":262,"../constants/xmlns_namespaces":268,"../lib":287,"@plotly/d3":20}],311:[function(_dereq_,module,exports){
+},{"../constants/alignment":274,"../constants/xmlns_namespaces":280,"../lib":299,"@plotly/d3":20}],323:[function(_dereq_,module,exports){
'use strict';
var timerCache = {};
@@ -57173,7 +59583,7 @@ function _clearTimeout(cache) {
}
}
-},{}],312:[function(_dereq_,module,exports){
+},{}],324:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -57193,7 +59603,7 @@ module.exports = function toLogRange(val, range) {
return newVal;
};
-},{"fast-isnumeric":33}],313:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33}],325:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -57207,7 +59617,7 @@ module.exports = {
}
};
-},{}],314:[function(_dereq_,module,exports){
+},{}],326:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -57242,7 +59652,7 @@ module.exports = {
}
};
-},{}],315:[function(_dereq_,module,exports){
+},{}],327:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -57291,7 +59701,7 @@ module.exports = function containerArrayMatch(astr) {
return {array: arrayStr, index: Number(match[1]), property: match[3] || ''};
};
-},{"../registry":378}],316:[function(_dereq_,module,exports){
+},{"../registry":387}],328:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -57406,7 +59816,7 @@ function overrideOne(attr, editTypeOverride, overrideContainers, key) {
}
}
-},{"../lib":287}],317:[function(_dereq_,module,exports){
+},{"../lib":299}],329:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -58100,7 +60510,7 @@ exports.clearAxisTypes = function(gd, traces, layoutUpdate) {
}
};
-},{"../components/color":157,"../lib":287,"../plots/cartesian/axis_ids":338,"../plots/plots":371,"../registry":378,"fast-isnumeric":33,"gl-mat4/fromQuat":39}],318:[function(_dereq_,module,exports){
+},{"../components/color":158,"../lib":299,"../plots/cartesian/axis_ids":350,"../plots/plots":380,"../registry":387,"fast-isnumeric":33,"gl-mat4/fromQuat":39}],330:[function(_dereq_,module,exports){
'use strict';
var main = _dereq_('./plot_api');
@@ -58135,7 +60545,7 @@ var templateApi = _dereq_('./template_api');
exports.makeTemplate = templateApi.makeTemplate;
exports.validateTemplate = templateApi.validateTemplate;
-},{"../snapshot/download":380,"./plot_api":320,"./template_api":325,"./to_image":326,"./validate":327}],319:[function(_dereq_,module,exports){
+},{"../snapshot/download":389,"./plot_api":332,"./template_api":337,"./to_image":338,"./validate":339}],331:[function(_dereq_,module,exports){
'use strict';
var isPlainObject = _dereq_('../lib/is_plain_object');
@@ -58339,7 +60749,7 @@ exports.applyContainerArrayChanges = function applyContainerArrayChanges(gd, np,
return true;
};
-},{"../lib/is_plain_object":288,"../lib/loggers":291,"../lib/noop":296,"../lib/search":306,"../registry":378,"./container_array_match":315}],320:[function(_dereq_,module,exports){
+},{"../lib/is_plain_object":300,"../lib/loggers":303,"../lib/noop":308,"../lib/search":318,"../registry":387,"./container_array_match":327}],332:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -58361,7 +60771,7 @@ var Drawing = _dereq_('../components/drawing');
var Color = _dereq_('../components/color');
var initInteractions = _dereq_('../plots/cartesian/graph_interact').initInteractions;
var xmlnsNamespaces = _dereq_('../constants/xmlns_namespaces');
-var clearSelect = _dereq_('../plots/cartesian/select').clearSelect;
+var clearOutline = _dereq_('../components/selections').clearOutline;
var dfltConfig = _dereq_('./plot_config').dfltConfig;
var manageArrays = _dereq_('./manage_arrays');
@@ -58711,6 +61121,7 @@ function _doPlot(gd, data, layout, config) {
Plots.addLinks,
Plots.rehover,
Plots.redrag,
+ Plots.reselect,
// TODO: doAutoMargin is only needed here for axis automargin, which
// happens outside of marginPushers where all the other automargins are
// calculated. Would be much better to separate margin calculations from
@@ -59641,7 +62052,11 @@ function restyle(gd, astr, val, _traces) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
Queue.add(gd,
restyle, [gd, specs.undoit, specs.traces],
@@ -60143,7 +62558,11 @@ function relayout(gd, astr, val) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
Queue.add(gd,
relayout, [gd, specs.undoit],
@@ -60232,7 +62651,7 @@ function addAxRangeSequence(seq, rangesAltered) {
};
seq.push(
- clearSelect,
+ clearOutline,
subroutines.doAutoRangeAndConstraints,
drawAxes,
subroutines.drawData,
@@ -60656,7 +63075,11 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
Queue.add(gd,
update, [gd, restyleSpecs.undoit, relayoutSpecs.undoit, restyleSpecs.traces],
@@ -61092,7 +63515,11 @@ function react(gd, data, layout, config) {
seq.push(emitAfterPlot);
}
- seq.push(Plots.rehover, Plots.redrag);
+ seq.push(
+ Plots.rehover,
+ Plots.redrag,
+ Plots.reselect
+ );
plotDone = Lib.syncOrAsync(seq, gd);
if(!plotDone || !plotDone.then) plotDone = Promise.resolve(gd);
@@ -62143,6 +64570,7 @@ function makePlotFramework(gd) {
fullLayout._shapeUpperLayer = layerAbove.append('g')
.classed('shapelayer', true);
+ fullLayout._selectionLayer = fullLayout._toppaper.append('g').classed('selectionlayer', true);
fullLayout._infolayer = fullLayout._toppaper.append('g').classed('infolayer', true);
fullLayout._menulayer = fullLayout._toppaper.append('g').classed('menulayer', true);
fullLayout._zoomlayer = fullLayout._toppaper.append('g').classed('zoomlayer', true);
@@ -62187,7 +64615,7 @@ exports._guiUpdate = guiEdit(update);
exports._storeDirectGUIEdit = _storeDirectGUIEdit;
-},{"../components/color":157,"../components/drawing":179,"../constants/xmlns_namespaces":268,"../lib":287,"../lib/events":280,"../lib/queue":302,"../plots/cartesian/axes":334,"../plots/cartesian/constants":341,"../plots/cartesian/graph_interact":344,"../plots/cartesian/select":355,"../plots/plots":371,"../registry":378,"./edit_types":316,"./helpers":317,"./manage_arrays":319,"./plot_config":321,"./plot_schema":322,"./subroutines":324,"@plotly/d3":20,"fast-isnumeric":33,"has-hover":64}],321:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/drawing":180,"../components/selections":246,"../constants/xmlns_namespaces":280,"../lib":299,"../lib/events":292,"../lib/queue":314,"../plots/cartesian/axes":346,"../plots/cartesian/constants":353,"../plots/cartesian/graph_interact":356,"../plots/plots":380,"../registry":387,"./edit_types":328,"./helpers":329,"./manage_arrays":331,"./plot_config":333,"./plot_schema":334,"./subroutines":336,"@plotly/d3":20,"fast-isnumeric":33,"has-hover":64}],333:[function(_dereq_,module,exports){
'use strict';
/**
@@ -62453,7 +64881,7 @@ module.exports = {
dfltConfig: dfltConfig
};
-},{}],322:[function(_dereq_,module,exports){
+},{}],334:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -63118,7 +65546,7 @@ function insertAttrs(baseAttrs, newAttrs, astr) {
np.set(extendDeepAll(np.get() || {}, newAttrs));
}
-},{"../lib":287,"../plots/animation_attributes":328,"../plots/attributes":330,"../plots/frame_attributes":366,"../plots/layout_attributes":369,"../registry":378,"./edit_types":316,"./plot_config":321}],323:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/animation_attributes":340,"../plots/attributes":342,"../plots/frame_attributes":375,"../plots/layout_attributes":378,"../registry":387,"./edit_types":328,"./plot_config":333}],335:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -63417,7 +65845,7 @@ exports.arrayEditor = function(parentIn, containerStr, itemOut) {
};
};
-},{"../lib":287,"../plots/attributes":330}],324:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/attributes":342}],336:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -64012,6 +66440,7 @@ exports.drawData = function(gd) {
// draw components that can be drawn on axes,
// and that do not push the margins
+ Registry.getComponentMethod('selections', 'draw')(gd);
Registry.getComponentMethod('shapes', 'draw')(gd);
Registry.getComponentMethod('annotations', 'draw')(gd);
Registry.getComponentMethod('images', 'draw')(gd);
@@ -64133,7 +66562,7 @@ exports.drawMarginPushers = function(gd) {
Registry.getComponentMethod('colorbar', 'draw')(gd);
};
-},{"../components/color":157,"../components/drawing":179,"../components/modebar":220,"../components/titles":255,"../constants/alignment":262,"../lib":287,"../lib/clear_gl_canvases":275,"../plots/cartesian/autorange":333,"../plots/cartesian/axes":334,"../plots/cartesian/constraints":342,"../plots/plots":371,"../registry":378,"@plotly/d3":20}],325:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/drawing":180,"../components/modebar":221,"../components/titles":267,"../constants/alignment":274,"../lib":299,"../lib/clear_gl_canvases":287,"../plots/cartesian/autorange":345,"../plots/cartesian/axes":346,"../plots/cartesian/constraints":354,"../plots/plots":380,"../registry":387,"@plotly/d3":20}],337:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -64586,7 +67015,7 @@ function format(opts) {
return opts;
}
-},{"../lib":287,"../plots/attributes":330,"../plots/plots":371,"./plot_config":321,"./plot_schema":322,"./plot_template":323}],326:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/attributes":342,"../plots/plots":380,"./plot_config":333,"./plot_schema":334,"./plot_template":335}],338:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -64793,7 +67222,7 @@ function toImage(gd, opts) {
module.exports = toImage;
-},{"../lib":287,"../plots/plots":371,"../snapshot/helpers":382,"../snapshot/svgtoimg":384,"../snapshot/tosvg":386,"../version":552,"./plot_api":320,"fast-isnumeric":33}],327:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/plots":380,"../snapshot/helpers":391,"../snapshot/svgtoimg":393,"../snapshot/tosvg":395,"../version":561,"./plot_api":332,"fast-isnumeric":33}],339:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -65216,7 +67645,7 @@ function convertPathToAttributeString(path) {
return astr;
}
-},{"../lib":287,"../plots/plots":371,"./plot_config":321,"./plot_schema":322}],328:[function(_dereq_,module,exports){
+},{"../lib":299,"../plots/plots":380,"./plot_config":333,"./plot_schema":334}],340:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -65304,7 +67733,7 @@ module.exports = {
}
};
-},{}],329:[function(_dereq_,module,exports){
+},{}],341:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -65391,7 +67820,7 @@ module.exports = function handleArrayContainerDefaults(parentObjIn, parentObjOut
return contOut;
};
-},{"../lib":287,"../plot_api/plot_template":323}],330:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_template":335}],342:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('./font_attributes');
@@ -65513,7 +67942,7 @@ module.exports = {
}
};
-},{"../components/fx/attributes":188,"./font_attributes":365}],331:[function(_dereq_,module,exports){
+},{"../components/fx/attributes":189,"./font_attributes":374}],343:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -65608,7 +68037,7 @@ module.exports = function alignPeriod(trace, ax, axLetter, vals) {
};
};
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],332:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],344:[function(_dereq_,module,exports){
'use strict';
@@ -65625,7 +68054,7 @@ module.exports = {
}
};
-},{}],333:[function(_dereq_,module,exports){
+},{}],345:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -66252,7 +68681,7 @@ function goodNumber(v) {
function lessOrEqual(v0, v1) { return v0 <= v1; }
function greaterOrEqual(v0, v1) { return v0 >= v1; }
-},{"../../components/drawing":179,"../../constants/numerical":267,"../../lib":287,"../../registry":378,"./axis_ids":338,"@plotly/d3":20,"fast-isnumeric":33}],334:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../constants/numerical":279,"../../lib":299,"../../registry":387,"./axis_ids":350,"@plotly/d3":20,"fast-isnumeric":33}],346:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -66294,6 +68723,14 @@ var GRID_PATH = { K: 'gridline', L: 'path' };
var MINORGRID_PATH = { K: 'minor-gridline', L: 'path' };
var TICK_PATH = { K: 'tick', L: 'path' };
var TICK_TEXT = { K: 'tick', L: 'text' };
+var MARGIN_MAPPING = {
+ width: ['x', 'r', 'l', 'xl', 'xr'],
+ height: ['y', 't', 'b', 'yt', 'yb'],
+ right: ['r', 'xr'],
+ left: ['l', 'xl'],
+ top: ['t', 'yt'],
+ bottom: ['b', 'yb']
+};
var alignmentConstants = _dereq_('../../constants/alignment');
var MID_SHIFT = alignmentConstants.MID_SHIFT;
@@ -66460,6 +68897,7 @@ axes.redrawComponents = function(gd, axIds) {
_redrawOneComp('annotations', 'drawOne', '_annIndices');
_redrawOneComp('shapes', 'drawOne', '_shapeIndices');
_redrawOneComp('images', 'draw', '_imgIndices', true);
+ _redrawOneComp('selections', 'drawOne', '_selectionIndices');
};
var getDataConversions = axes.getDataConversions = function(gd, trace, target, targetArray) {
@@ -68877,6 +71315,11 @@ axes.drawOne = function(gd, ax, opts) {
rangeSliderPush = Registry.getComponentMethod('rangeslider', 'autoMarginOpts')(gd, ax);
}
+ if(typeof ax.automargin === 'string') {
+ filterPush(push, ax.automargin);
+ filterPush(mirrorPush, ax.automargin);
+ }
+
Plots.autoMargin(gd, axAutoMarginID(ax), push);
Plots.autoMargin(gd, axMirrorAutoMarginID(ax), mirrorPush);
Plots.autoMargin(gd, rangeSliderAutoMarginID(ax), rangeSliderPush);
@@ -68891,6 +71334,23 @@ axes.drawOne = function(gd, ax, opts) {
return Lib.syncOrAsync(seq);
};
+function filterPush(push, automargin) {
+ if(!push) return;
+
+ var keepMargin = Object.keys(MARGIN_MAPPING).reduce(function(data, nextKey) {
+ if(automargin.indexOf(nextKey) !== -1) {
+ MARGIN_MAPPING[nextKey].forEach(function(key) { data[key] = 1;});
+ }
+ return data;
+ }, {});
+ Object.keys(push).forEach(function(key) {
+ if(!keepMargin[key]) {
+ if(key.length === 1) push[key] = 0;
+ else delete push[key];
+ }
+ });
+}
+
function getBoundaryVals(ax, vals) {
var out = [];
var i;
@@ -70436,7 +72896,7 @@ function hideCounterAxisInsideTickLabels(ax, opts) {
}
}
-},{"../../components/color":157,"../../components/drawing":179,"../../components/titles":255,"../../constants/alignment":262,"../../constants/numerical":267,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../../registry":378,"./autorange":333,"./axis_autotype":335,"./axis_ids":338,"./clean_ticks":340,"./layout_attributes":349,"./set_convert":356,"@plotly/d3":20,"fast-isnumeric":33}],335:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../components/titles":267,"../../constants/alignment":274,"../../constants/numerical":279,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"./autorange":345,"./axis_autotype":347,"./axis_ids":350,"./clean_ticks":352,"./layout_attributes":359,"./set_convert":365,"@plotly/d3":20,"fast-isnumeric":33}],347:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -70558,7 +73018,7 @@ function multiCategory(a) {
return isArrayOrTypedArray(a[0]) && isArrayOrTypedArray(a[1]);
}
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],336:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],348:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -70901,7 +73361,7 @@ function indexOfDay(v) {
];
}
-},{"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378,"../array_container_defaults":329,"./category_order_defaults":339,"./constants":341,"./layout_attributes":349,"./line_grid_defaults":351,"./prefix_suffix_defaults":353,"./set_convert":356,"./tick_label_defaults":358,"./tick_mark_defaults":359,"./tick_value_defaults":360,"fast-isnumeric":33}],337:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"../array_container_defaults":341,"./category_order_defaults":351,"./constants":353,"./layout_attributes":359,"./line_grid_defaults":361,"./prefix_suffix_defaults":363,"./set_convert":365,"./tick_label_defaults":367,"./tick_mark_defaults":368,"./tick_value_defaults":369,"fast-isnumeric":33}],349:[function(_dereq_,module,exports){
'use strict';
var docs = _dereq_('../../constants/docs');
@@ -70950,7 +73410,7 @@ module.exports = {
descriptionWithDates: descriptionWithDates
};
-},{"../../constants/docs":264}],338:[function(_dereq_,module,exports){
+},{"../../constants/docs":276}],350:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -71098,7 +73558,7 @@ exports.isLinked = function(fullLayout, axId) {
);
};
-},{"../../registry":378,"./constants":341}],339:[function(_dereq_,module,exports){
+},{"../../registry":387,"./constants":353}],351:[function(_dereq_,module,exports){
'use strict';
function findCategories(ax, opts) {
@@ -71184,7 +73644,7 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut,
}
};
-},{}],340:[function(_dereq_,module,exports){
+},{}],352:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -71268,7 +73728,7 @@ exports.tick0 = function(tick0, axType, calendar, dtick) {
return isNumeric(tick0) ? Number(tick0) : 0;
};
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],341:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],353:[function(_dereq_,module,exports){
'use strict';
var counterRegex = _dereq_('../../lib/regex').counter;
@@ -71300,27 +73760,15 @@ module.exports = {
// pixels to move mouse before you stop clamping to starting point
MINDRAG: 8,
- // smallest dimension allowed for a select box
- MINSELECT: 12,
-
// smallest dimension allowed for a zoombox
MINZOOM: 20,
// width of axis drag regions
DRAGGERSIZE: 20,
- // max pixels off straight before a lasso select line counts as bent
- BENDPX: 1.5,
-
// delay before a redraw (relayout) after smooth panning and zooming
REDRAWDELAY: 50,
- // throttling limit (ms) for selectPoints calls
- SELECTDELAY: 100,
-
- // cache ID suffix for throttle
- SELECTID: '-select',
-
// last resort axis ranges for x and y axes if we have no data
DFLTRANGEX: [-1, 6],
DFLTRANGEY: [-1, 4],
@@ -71352,7 +73800,7 @@ module.exports = {
}
};
-},{"../../lib/regex":303}],342:[function(_dereq_,module,exports){
+},{"../../lib/regex":315}],354:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -71995,7 +74443,7 @@ function updateDomain(ax, factor) {
ax.setScale();
}
-},{"../../constants/alignment":262,"../../constants/numerical":267,"../../lib":287,"./autorange":333,"./axis_ids":338,"./layout_attributes":349,"./scale_zoom":354,"./set_convert":356}],343:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274,"../../constants/numerical":279,"../../lib":299,"./autorange":345,"./axis_ids":350,"./layout_attributes":359,"./scale_zoom":364,"./set_convert":365}],355:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -72024,9 +74472,9 @@ var redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;
var Plots = _dereq_('../plots');
var getFromId = _dereq_('./axis_ids').getFromId;
-var prepSelect = _dereq_('./select').prepSelect;
-var clearSelect = _dereq_('./select').clearSelect;
-var selectOnClick = _dereq_('./select').selectOnClick;
+var prepSelect = _dereq_('../../components/selections').prepSelect;
+var clearOutline = _dereq_('../../components/selections').clearOutline;
+var selectOnClick = _dereq_('../../components/selections').selectOnClick;
var scaleZoom = _dereq_('./scale_zoom');
var constants = _dereq_('./constants');
@@ -72229,9 +74677,6 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
updateSubplots([0, 0, pw, ph]);
dragOptions.moveFn(dragDataNow.dx, dragDataNow.dy);
}
-
- // TODO should we try to "re-select" under select/lasso modes?
- // probably best to wait for https://github.com/plotly/plotly.js/issues/1851
}
};
};
@@ -72240,7 +74685,7 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
// clear selection polygon cache (if any)
dragOptions.plotinfo.selection = false;
// clear selection outlines
- clearSelect(gd);
+ clearOutline(gd);
}
function clickFn(numClicks, evt) {
@@ -73327,7 +75772,7 @@ module.exports = {
attachWheelEventHandler: attachWheelEventHandler
};
-},{"../../components/color":157,"../../components/dragelement":176,"../../components/dragelement/helpers":175,"../../components/drawing":179,"../../components/fx":197,"../../constants/alignment":262,"../../lib":287,"../../lib/clear_gl_canvases":275,"../../lib/setcursor":307,"../../lib/svg_text_utils":310,"../../plot_api/subroutines":324,"../../registry":378,"../plots":371,"./axes":334,"./axis_ids":338,"./constants":341,"./scale_zoom":354,"./select":355,"@plotly/d3":20,"has-passive-events":65,"tinycolor2":121}],344:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/dragelement":177,"../../components/dragelement/helpers":176,"../../components/drawing":180,"../../components/fx":198,"../../components/selections":246,"../../constants/alignment":274,"../../lib":299,"../../lib/clear_gl_canvases":287,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plot_api/subroutines":336,"../../registry":387,"../plots":380,"./axes":346,"./axis_ids":350,"./constants":353,"./scale_zoom":364,"@plotly/d3":20,"has-passive-events":65,"tinycolor2":122}],356:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -73486,82 +75931,7 @@ exports.updateFx = function(gd) {
setCursor(fullLayout._draggers, cursor);
};
-},{"../../components/dragelement":176,"../../components/fx":197,"../../lib/setcursor":307,"./constants":341,"./dragbox":343,"@plotly/d3":20}],345:[function(_dereq_,module,exports){
-'use strict';
-
-function clearOutlineControllers(gd) {
- var zoomLayer = gd._fullLayout._zoomlayer;
- if(zoomLayer) {
- zoomLayer.selectAll('.outline-controllers').remove();
- }
-}
-
-function clearSelect(gd) {
- var zoomLayer = gd._fullLayout._zoomlayer;
- if(zoomLayer) {
- // until we get around to persistent selections, remove the outline
- // here. The selection itself will be removed when the plot redraws
- // at the end.
- zoomLayer.selectAll('.select-outline').remove();
- }
-
- gd._fullLayout._drawing = false;
-}
-
-module.exports = {
- clearOutlineControllers: clearOutlineControllers,
- clearSelect: clearSelect
-};
-
-},{}],346:[function(_dereq_,module,exports){
-'use strict';
-
-var strTranslate = _dereq_('../../lib').strTranslate;
-
-// in v3 (once log ranges are fixed),
-// we'll be able to p2r here for all axis types
-function p2r(ax, v) {
- switch(ax.type) {
- case 'log':
- return ax.p2d(v);
- case 'date':
- return ax.p2r(v, 0, ax.calendar);
- default:
- return ax.p2r(v);
- }
-}
-
-function r2p(ax, v) {
- switch(ax.type) {
- case 'log':
- return ax.d2p(v);
- case 'date':
- return ax.r2p(v, 0, ax.calendar);
- default:
- return ax.r2p(v);
- }
-}
-
-function axValue(ax) {
- var index = (ax._id.charAt(0) === 'y') ? 1 : 0;
- return function(v) { return p2r(ax, v[index]); };
-}
-
-function getTransform(plotinfo) {
- return strTranslate(
- plotinfo.xaxis._offset,
- plotinfo.yaxis._offset
- );
-}
-
-module.exports = {
- p2r: p2r,
- r2p: r2p,
- axValue: axValue,
- getTransform: getTransform
-};
-
-},{"../../lib":287}],347:[function(_dereq_,module,exports){
+},{"../../components/dragelement":177,"../../components/fx":198,"../../lib/setcursor":319,"./constants":353,"./dragbox":355,"@plotly/d3":20}],357:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -73630,7 +76000,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
};
};
-},{"../../lib":287,"../../registry":378,"./axis_ids":338}],348:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./axis_ids":350}],358:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -74247,7 +76617,7 @@ exports.toSVG = function(gd) {
exports.updateFx = _dereq_('./graph_interact').updateFx;
-},{"../../components/drawing":179,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../registry":378,"../get_data":367,"../plots":371,"./attributes":332,"./axis_ids":338,"./constants":341,"./graph_interact":344,"./layout_attributes":349,"./layout_defaults":350,"./transition_axes":361,"@plotly/d3":20}],349:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../registry":387,"../get_data":376,"../plots":380,"./attributes":344,"./axis_ids":350,"./constants":353,"./graph_interact":356,"./layout_attributes":359,"./layout_defaults":360,"./transition_axes":370,"@plotly/d3":20}],359:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('../font_attributes');
@@ -74595,7 +76965,9 @@ module.exports = {
editType: 'ticks',
},
automargin: {
- valType: 'boolean',
+ valType: 'flaglist',
+ flags: ['height', 'width', 'left', 'right', 'top', 'bottom'],
+ extras: [true, false],
dflt: false,
editType: 'ticks',
},
@@ -74879,7 +77251,7 @@ module.exports = {
}
};
-},{"../../components/color/attributes":156,"../../components/drawing/attributes":178,"../../constants/numerical":267,"../../lib/extend":281,"../../plot_api/plot_template":323,"../../plots/cartesian/axis_format_attributes":337,"../font_attributes":365,"./constants":341}],350:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../components/drawing/attributes":179,"../../constants/numerical":279,"../../lib/extend":293,"../../plot_api/plot_template":335,"../../plots/cartesian/axis_format_attributes":349,"../font_attributes":374,"./constants":353}],360:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -75028,6 +77400,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
axLayoutOut._traceIndices = traces.map(function(t) { return t._expandedIndex; });
axLayoutOut._annIndices = [];
axLayoutOut._shapeIndices = [];
+ axLayoutOut._selectionIndices = [];
axLayoutOut._imgIndices = [];
axLayoutOut._subplotsWith = [];
axLayoutOut._counterAxes = [];
@@ -75258,7 +77631,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
});
};
-},{"../../components/color":157,"../../components/fx/helpers":193,"../../components/fx/hovermode_defaults":196,"../../lib":287,"../../plot_api/plot_template":323,"../../registry":378,"../layout_attributes":369,"./axis_defaults":336,"./axis_ids":338,"./constants":341,"./constraints":342,"./layout_attributes":349,"./position_defaults":352,"./type_defaults":362}],351:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx/helpers":194,"../../components/fx/hovermode_defaults":197,"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"../layout_attributes":378,"./axis_defaults":348,"./axis_ids":350,"./constants":353,"./constraints":354,"./layout_attributes":359,"./position_defaults":362,"./type_defaults":371}],361:[function(_dereq_,module,exports){
'use strict';
var colorMix = _dereq_('tinycolor2').mix;
@@ -75339,7 +77712,7 @@ module.exports = function handleLineGridDefaults(containerIn, containerOut, coer
}
};
-},{"../../components/color/attributes":156,"../../lib":287,"tinycolor2":121}],352:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib":299,"tinycolor2":122}],362:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -75418,7 +77791,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer
return containerOut;
};
-},{"../../lib":287,"fast-isnumeric":33}],353:[function(_dereq_,module,exports){
+},{"../../lib":299,"fast-isnumeric":33}],363:[function(_dereq_,module,exports){
'use strict';
var getShowAttrDflt = _dereq_('./show_dflt');
@@ -75436,7 +77809,7 @@ module.exports = function handlePrefixSuffixDefaults(containerIn, containerOut,
if(tickSuffix) coerce('showticksuffix', showAttrDflt);
};
-},{"./show_dflt":357}],354:[function(_dereq_,module,exports){
+},{"./show_dflt":366}],364:[function(_dereq_,module,exports){
'use strict';
var FROM_BL = _dereq_('../../constants/alignment').FROM_BL;
@@ -75456,941 +77829,7 @@ module.exports = function scaleZoom(ax, factor, centerFraction) {
ax.setScale();
};
-},{"../../constants/alignment":262}],355:[function(_dereq_,module,exports){
-'use strict';
-
-var polybool = _dereq_('polybooljs');
-
-var Registry = _dereq_('../../registry');
-var dashStyle = _dereq_('../../components/drawing').dashStyle;
-var Color = _dereq_('../../components/color');
-var Fx = _dereq_('../../components/fx');
-var makeEventData = _dereq_('../../components/fx/helpers').makeEventData;
-var dragHelpers = _dereq_('../../components/dragelement/helpers');
-var freeMode = dragHelpers.freeMode;
-var rectMode = dragHelpers.rectMode;
-var drawMode = dragHelpers.drawMode;
-var openMode = dragHelpers.openMode;
-var selectMode = dragHelpers.selectMode;
-
-var displayOutlines = _dereq_('../../components/shapes/draw_newshape/display_outlines');
-var handleEllipse = _dereq_('../../components/shapes/draw_newshape/helpers').handleEllipse;
-var newShapes = _dereq_('../../components/shapes/draw_newshape/newshapes');
-
-var Lib = _dereq_('../../lib');
-var polygon = _dereq_('../../lib/polygon');
-var throttle = _dereq_('../../lib/throttle');
-var getFromId = _dereq_('./axis_ids').getFromId;
-var clearGlCanvases = _dereq_('../../lib/clear_gl_canvases');
-
-var redrawReglTraces = _dereq_('../../plot_api/subroutines').redrawReglTraces;
-
-var constants = _dereq_('./constants');
-var MINSELECT = constants.MINSELECT;
-
-var filteredPolygon = polygon.filter;
-var polygonTester = polygon.tester;
-
-var clearSelect = _dereq_('./handle_outline').clearSelect;
-
-var helpers = _dereq_('./helpers');
-var p2r = helpers.p2r;
-var axValue = helpers.axValue;
-var getTransform = helpers.getTransform;
-
-function prepSelect(e, startX, startY, dragOptions, mode) {
- var isFreeMode = freeMode(mode);
- var isRectMode = rectMode(mode);
- var isOpenMode = openMode(mode);
- var isDrawMode = drawMode(mode);
- var isSelectMode = selectMode(mode);
-
- var isLine = mode === 'drawline';
- var isEllipse = mode === 'drawcircle';
- var isLineOrEllipse = isLine || isEllipse; // cases with two start & end positions
-
- var gd = dragOptions.gd;
- var fullLayout = gd._fullLayout;
- var zoomLayer = fullLayout._zoomlayer;
- var dragBBox = dragOptions.element.getBoundingClientRect();
- var plotinfo = dragOptions.plotinfo;
- var transform = getTransform(plotinfo);
- var x0 = startX - dragBBox.left;
- var y0 = startY - dragBBox.top;
-
- fullLayout._calcInverseTransform(gd);
- var transformedCoords = Lib.apply3DTransform(fullLayout._invTransform)(x0, y0);
- x0 = transformedCoords[0];
- y0 = transformedCoords[1];
- var scaleX = fullLayout._invScaleX;
- var scaleY = fullLayout._invScaleY;
-
- var x1 = x0;
- var y1 = y0;
- var path0 = 'M' + x0 + ',' + y0;
- var pw = dragOptions.xaxes[0]._length;
- var ph = dragOptions.yaxes[0]._length;
- var allAxes = dragOptions.xaxes.concat(dragOptions.yaxes);
- var subtract = e.altKey &&
- !(drawMode(mode) && isOpenMode);
-
- var filterPoly, selectionTester, mergedPolygons, currentPolygon;
- var i, searchInfo, eventData;
-
- coerceSelectionsCache(e, gd, dragOptions);
-
- if(isFreeMode) {
- filterPoly = filteredPolygon([[x0, y0]], constants.BENDPX);
- }
-
- var outlines = zoomLayer.selectAll('path.select-outline-' + plotinfo.id).data(isDrawMode ? [0] : [1, 2]);
- var drwStyle = fullLayout.newshape;
-
- outlines.enter()
- .append('path')
- .attr('class', function(d) { return 'select-outline select-outline-' + d + ' select-outline-' + plotinfo.id; })
- .style(isDrawMode ? {
- opacity: drwStyle.opacity / 2,
- fill: isOpenMode ? undefined : drwStyle.fillcolor,
- stroke: drwStyle.line.color,
- 'stroke-dasharray': dashStyle(drwStyle.line.dash, drwStyle.line.width),
- 'stroke-width': drwStyle.line.width + 'px'
- } : {})
- .attr('fill-rule', drwStyle.fillrule)
- .classed('cursor-move', isDrawMode ? true : false)
- .attr('transform', transform)
- .attr('d', path0 + 'Z');
-
- var corners = zoomLayer.append('path')
- .attr('class', 'zoombox-corners')
- .style({
- fill: Color.background,
- stroke: Color.defaultLine,
- 'stroke-width': 1
- })
- .attr('transform', transform)
- .attr('d', 'M0,0Z');
-
-
- var throttleID = fullLayout._uid + constants.SELECTID;
- var selection = [];
-
- // find the traces to search for selection points
- var searchTraces = determineSearchTraces(gd, dragOptions.xaxes,
- dragOptions.yaxes, dragOptions.subplot);
-
- function ascending(a, b) { return a - b; }
-
- // allow subplots to override fillRangeItems routine
- var fillRangeItems;
-
- if(plotinfo.fillRangeItems) {
- fillRangeItems = plotinfo.fillRangeItems;
- } else {
- if(isRectMode) {
- fillRangeItems = function(eventData, poly) {
- var ranges = eventData.range = {};
-
- for(i = 0; i < allAxes.length; i++) {
- var ax = allAxes[i];
- var axLetter = ax._id.charAt(0);
-
- ranges[ax._id] = [
- p2r(ax, poly[axLetter + 'min']),
- p2r(ax, poly[axLetter + 'max'])
- ].sort(ascending);
- }
- };
- } else { // case of isFreeMode
- fillRangeItems = function(eventData, poly, filterPoly) {
- var dataPts = eventData.lassoPoints = {};
-
- for(i = 0; i < allAxes.length; i++) {
- var ax = allAxes[i];
- dataPts[ax._id] = filterPoly.filtered.map(axValue(ax));
- }
- };
- }
- }
-
- dragOptions.moveFn = function(dx0, dy0) {
- x1 = Math.max(0, Math.min(pw, scaleX * dx0 + x0));
- y1 = Math.max(0, Math.min(ph, scaleY * dy0 + y0));
-
- var dx = Math.abs(x1 - x0);
- var dy = Math.abs(y1 - y0);
-
- if(isRectMode) {
- var direction;
- var start, end;
-
- if(isSelectMode) {
- var q = fullLayout.selectdirection;
-
- if(q === 'any') {
- if(dy < Math.min(dx * 0.6, MINSELECT)) {
- direction = 'h';
- } else if(dx < Math.min(dy * 0.6, MINSELECT)) {
- direction = 'v';
- } else {
- direction = 'd';
- }
- } else {
- direction = q;
- }
-
- switch(direction) {
- case 'h':
- start = isEllipse ? ph / 2 : 0;
- end = ph;
- break;
- case 'v':
- start = isEllipse ? pw / 2 : 0;
- end = pw;
- break;
- }
- }
-
- if(isDrawMode) {
- switch(fullLayout.newshape.drawdirection) {
- case 'vertical':
- direction = 'h';
- start = isEllipse ? ph / 2 : 0;
- end = ph;
- break;
- case 'horizontal':
- direction = 'v';
- start = isEllipse ? pw / 2 : 0;
- end = pw;
- break;
- case 'ortho':
- if(dx < dy) {
- direction = 'h';
- start = y0;
- end = y1;
- } else {
- direction = 'v';
- start = x0;
- end = x1;
- }
- break;
- default: // i.e. case of 'diagonal'
- direction = 'd';
- }
- }
-
- if(direction === 'h') {
- // horizontal motion
- currentPolygon = isLineOrEllipse ?
- handleEllipse(isEllipse, [x1, start], [x1, end]) : // using x1 instead of x0 allows adjusting the line while drawing
- [[x0, start], [x0, end], [x1, end], [x1, start]]; // make a vertical box
-
- currentPolygon.xmin = isLineOrEllipse ? x1 : Math.min(x0, x1);
- currentPolygon.xmax = isLineOrEllipse ? x1 : Math.max(x0, x1);
- currentPolygon.ymin = Math.min(start, end);
- currentPolygon.ymax = Math.max(start, end);
- // extras to guide users in keeping a straight selection
- corners.attr('d', 'M' + currentPolygon.xmin + ',' + (y0 - MINSELECT) +
- 'h-4v' + (2 * MINSELECT) + 'h4Z' +
- 'M' + (currentPolygon.xmax - 1) + ',' + (y0 - MINSELECT) +
- 'h4v' + (2 * MINSELECT) + 'h-4Z');
- } else if(direction === 'v') {
- // vertical motion
- currentPolygon = isLineOrEllipse ?
- handleEllipse(isEllipse, [start, y1], [end, y1]) : // using y1 instead of y0 allows adjusting the line while drawing
- [[start, y0], [start, y1], [end, y1], [end, y0]]; // make a horizontal box
-
- currentPolygon.xmin = Math.min(start, end);
- currentPolygon.xmax = Math.max(start, end);
- currentPolygon.ymin = isLineOrEllipse ? y1 : Math.min(y0, y1);
- currentPolygon.ymax = isLineOrEllipse ? y1 : Math.max(y0, y1);
- corners.attr('d', 'M' + (x0 - MINSELECT) + ',' + currentPolygon.ymin +
- 'v-4h' + (2 * MINSELECT) + 'v4Z' +
- 'M' + (x0 - MINSELECT) + ',' + (currentPolygon.ymax - 1) +
- 'v4h' + (2 * MINSELECT) + 'v-4Z');
- } else if(direction === 'd') {
- // diagonal motion
- currentPolygon = isLineOrEllipse ?
- handleEllipse(isEllipse, [x0, y0], [x1, y1]) :
- [[x0, y0], [x0, y1], [x1, y1], [x1, y0]];
-
- currentPolygon.xmin = Math.min(x0, x1);
- currentPolygon.xmax = Math.max(x0, x1);
- currentPolygon.ymin = Math.min(y0, y1);
- currentPolygon.ymax = Math.max(y0, y1);
- corners.attr('d', 'M0,0Z');
- }
- } else if(isFreeMode) {
- filterPoly.addPt([x1, y1]);
- currentPolygon = filterPoly.filtered;
- }
-
- // create outline & tester
- if(dragOptions.selectionDefs && dragOptions.selectionDefs.length) {
- mergedPolygons = mergePolygons(dragOptions.mergedPolygons, currentPolygon, subtract);
- currentPolygon.subtract = subtract;
- selectionTester = multiTester(dragOptions.selectionDefs.concat([currentPolygon]));
- } else {
- mergedPolygons = [currentPolygon];
- selectionTester = polygonTester(currentPolygon);
- }
-
- // display polygons on the screen
- displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
-
- if(isSelectMode) {
- throttle.throttle(
- throttleID,
- constants.SELECTDELAY,
- function() {
- selection = [];
-
- var thisSelection;
- var traceSelections = [];
- var traceSelection;
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
-
- traceSelection = searchInfo._module.selectPoints(searchInfo, selectionTester);
- traceSelections.push(traceSelection);
-
- thisSelection = fillSelectionItem(traceSelection, searchInfo);
-
- if(selection.length) {
- for(var j = 0; j < thisSelection.length; j++) {
- selection.push(thisSelection[j]);
- }
- } else selection = thisSelection;
- }
-
- eventData = {points: selection};
- updateSelectedState(gd, searchTraces, eventData);
- fillRangeItems(eventData, currentPolygon, filterPoly);
- dragOptions.gd.emit('plotly_selecting', eventData);
- }
- );
- }
- };
-
- dragOptions.clickFn = function(numClicks, evt) {
- corners.remove();
-
- if(gd._fullLayout._activeShapeIndex >= 0) {
- gd._fullLayout._deactivateShape(gd);
- return;
- }
- if(isDrawMode) return;
-
- var clickmode = fullLayout.clickmode;
-
- throttle.done(throttleID).then(function() {
- throttle.clear(throttleID);
- if(numClicks === 2) {
- // clear selection on doubleclick
- outlines.remove();
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- searchInfo._module.selectPoints(searchInfo, false);
- }
-
- updateSelectedState(gd, searchTraces);
-
- clearSelectionsCache(dragOptions);
-
- gd.emit('plotly_deselect', null);
- } else {
- if(clickmode.indexOf('select') > -1) {
- selectOnClick(evt, gd, dragOptions.xaxes, dragOptions.yaxes,
- dragOptions.subplot, dragOptions, outlines);
- }
-
- if(clickmode === 'event') {
- // TODO: remove in v3 - this was probably never intended to work as it does,
- // but in case anyone depends on it we don't want to break it now.
- // Note that click-to-select introduced pre v3 also emitts proper
- // event data when clickmode is having 'select' in its flag list.
- gd.emit('plotly_selected', undefined);
- }
- }
-
- Fx.click(gd, evt);
- }).catch(Lib.error);
- };
-
- dragOptions.doneFn = function() {
- corners.remove();
-
- throttle.done(throttleID).then(function() {
- throttle.clear(throttleID);
- dragOptions.gd.emit('plotly_selected', eventData);
-
- if(currentPolygon && dragOptions.selectionDefs) {
- // save last polygons
- currentPolygon.subtract = subtract;
- dragOptions.selectionDefs.push(currentPolygon);
-
- // we have to keep reference to arrays container
- dragOptions.mergedPolygons.length = 0;
- [].push.apply(dragOptions.mergedPolygons, mergedPolygons);
- }
-
- if(dragOptions.doneFnCompleted) {
- dragOptions.doneFnCompleted(selection);
- }
- }).catch(Lib.error);
-
- if(isDrawMode) {
- clearSelectionsCache(dragOptions);
- }
- };
-}
-
-function selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutlines) {
- var hoverData = gd._hoverdata;
- var fullLayout = gd._fullLayout;
- var clickmode = fullLayout.clickmode;
- var sendEvents = clickmode.indexOf('event') > -1;
- var selection = [];
- var searchTraces, searchInfo, currentSelectionDef, selectionTester, traceSelection;
- var thisTracesSelection, pointOrBinSelected, subtract, eventData, i;
-
- if(isHoverDataSet(hoverData)) {
- coerceSelectionsCache(evt, gd, dragOptions);
- searchTraces = determineSearchTraces(gd, xAxes, yAxes, subplot);
- var clickedPtInfo = extractClickedPtInfo(hoverData, searchTraces);
- var isBinnedTrace = clickedPtInfo.pointNumbers.length > 0;
-
-
- // Note: potentially costly operation isPointOrBinSelected is
- // called as late as possible through the use of an assignment
- // in an if condition.
- if(isBinnedTrace ?
- isOnlyThisBinSelected(searchTraces, clickedPtInfo) :
- isOnlyOnePointSelected(searchTraces) &&
- (pointOrBinSelected = isPointOrBinSelected(clickedPtInfo))) {
- if(polygonOutlines) polygonOutlines.remove();
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- searchInfo._module.selectPoints(searchInfo, false);
- }
-
- updateSelectedState(gd, searchTraces);
-
- clearSelectionsCache(dragOptions);
-
- if(sendEvents) {
- gd.emit('plotly_deselect', null);
- }
- } else {
- subtract = evt.shiftKey &&
- (pointOrBinSelected !== undefined ?
- pointOrBinSelected :
- isPointOrBinSelected(clickedPtInfo));
- currentSelectionDef = newPointSelectionDef(clickedPtInfo.pointNumber, clickedPtInfo.searchInfo, subtract);
-
- var allSelectionDefs = dragOptions.selectionDefs.concat([currentSelectionDef]);
- selectionTester = multiTester(allSelectionDefs);
-
- for(i = 0; i < searchTraces.length; i++) {
- traceSelection = searchTraces[i]._module.selectPoints(searchTraces[i], selectionTester);
- thisTracesSelection = fillSelectionItem(traceSelection, searchTraces[i]);
-
- if(selection.length) {
- for(var j = 0; j < thisTracesSelection.length; j++) {
- selection.push(thisTracesSelection[j]);
- }
- } else selection = thisTracesSelection;
- }
-
- eventData = {points: selection};
- updateSelectedState(gd, searchTraces, eventData);
-
- if(currentSelectionDef && dragOptions) {
- dragOptions.selectionDefs.push(currentSelectionDef);
- }
-
- if(polygonOutlines) {
- var polygons = dragOptions.mergedPolygons;
- var isOpenMode = openMode(dragOptions.dragmode);
-
- // display polygons on the screen
- displayOutlines(convertPoly(polygons, isOpenMode), polygonOutlines, dragOptions);
- }
-
- if(sendEvents) {
- gd.emit('plotly_selected', eventData);
- }
- }
- }
-}
-
-/**
- * Constructs a new point selection definition object.
- */
-function newPointSelectionDef(pointNumber, searchInfo, subtract) {
- return {
- pointNumber: pointNumber,
- searchInfo: searchInfo,
- subtract: subtract
- };
-}
-
-function isPointSelectionDef(o) {
- return 'pointNumber' in o && 'searchInfo' in o;
-}
-
-/*
- * Constructs a new point number tester.
- */
-function newPointNumTester(pointSelectionDef) {
- return {
- xmin: 0,
- xmax: 0,
- ymin: 0,
- ymax: 0,
- pts: [],
- contains: function(pt, omitFirstEdge, pointNumber, searchInfo) {
- var idxWantedTrace = pointSelectionDef.searchInfo.cd[0].trace._expandedIndex;
- var idxActualTrace = searchInfo.cd[0].trace._expandedIndex;
- return idxActualTrace === idxWantedTrace &&
- pointNumber === pointSelectionDef.pointNumber;
- },
- isRect: false,
- degenerate: false,
- subtract: pointSelectionDef.subtract
- };
-}
-
-/**
- * Wraps multiple selection testers.
- *
- * @param {Array} list - An array of selection testers.
- *
- * @return a selection tester object with a contains function
- * that can be called to evaluate a point against all wrapped
- * selection testers that were passed in list.
- */
-function multiTester(list) {
- var testers = [];
- var xmin = isPointSelectionDef(list[0]) ? 0 : list[0][0][0];
- var xmax = xmin;
- var ymin = isPointSelectionDef(list[0]) ? 0 : list[0][0][1];
- var ymax = ymin;
-
- for(var i = 0; i < list.length; i++) {
- if(isPointSelectionDef(list[i])) {
- testers.push(newPointNumTester(list[i]));
- } else {
- var tester = polygon.tester(list[i]);
- tester.subtract = list[i].subtract;
- testers.push(tester);
- xmin = Math.min(xmin, tester.xmin);
- xmax = Math.max(xmax, tester.xmax);
- ymin = Math.min(ymin, tester.ymin);
- ymax = Math.max(ymax, tester.ymax);
- }
- }
-
- /**
- * Tests if the given point is within this tester.
- *
- * @param {Array} pt - [0] is the x coordinate, [1] is the y coordinate of the point.
- * @param {*} arg - An optional parameter to pass down to wrapped testers.
- * @param {number} pointNumber - The point number of the point within the underlying data array.
- * @param {number} searchInfo - An object identifying the trace the point is contained in.
- *
- * @return {boolean} true if point is considered to be selected, false otherwise.
- */
- function contains(pt, arg, pointNumber, searchInfo) {
- var contained = false;
- for(var i = 0; i < testers.length; i++) {
- if(testers[i].contains(pt, arg, pointNumber, searchInfo)) {
- // if contained by subtract tester - exclude the point
- contained = testers[i].subtract === false;
- }
- }
-
- return contained;
- }
-
- return {
- xmin: xmin,
- xmax: xmax,
- ymin: ymin,
- ymax: ymax,
- pts: [],
- contains: contains,
- isRect: false,
- degenerate: false
- };
-}
-
-function coerceSelectionsCache(evt, gd, dragOptions) {
- gd._fullLayout._drawing = false;
-
- var fullLayout = gd._fullLayout;
- var plotinfo = dragOptions.plotinfo;
- var dragmode = dragOptions.dragmode;
-
- var selectingOnSameSubplot = (
- fullLayout._lastSelectedSubplot &&
- fullLayout._lastSelectedSubplot === plotinfo.id
- );
-
- var hasModifierKey = (evt.shiftKey || evt.altKey) &&
- !(drawMode(dragmode) && openMode(dragmode));
-
- if(selectingOnSameSubplot && hasModifierKey &&
- (plotinfo.selection && plotinfo.selection.selectionDefs) && !dragOptions.selectionDefs) {
- // take over selection definitions from prev mode, if any
- dragOptions.selectionDefs = plotinfo.selection.selectionDefs;
- dragOptions.mergedPolygons = plotinfo.selection.mergedPolygons;
- } else if(!hasModifierKey || !plotinfo.selection) {
- clearSelectionsCache(dragOptions);
- }
-
- // clear selection outline when selecting a different subplot
- if(!selectingOnSameSubplot) {
- clearSelect(gd);
- fullLayout._lastSelectedSubplot = plotinfo.id;
- }
-}
-
-function clearSelectionsCache(dragOptions) {
- var dragmode = dragOptions.dragmode;
- var plotinfo = dragOptions.plotinfo;
-
- var gd = dragOptions.gd;
- if(gd._fullLayout._activeShapeIndex >= 0) {
- gd._fullLayout._deactivateShape(gd);
- }
-
- if(drawMode(dragmode)) {
- var fullLayout = gd._fullLayout;
- var zoomLayer = fullLayout._zoomlayer;
-
- var outlines = zoomLayer.selectAll('.select-outline-' + plotinfo.id);
- if(outlines && gd._fullLayout._drawing) {
- // add shape
- var shapes = newShapes(outlines, dragOptions);
- if(shapes) {
- Registry.call('_guiRelayout', gd, {
- shapes: shapes
- });
- }
-
- gd._fullLayout._drawing = false;
- }
- }
-
- plotinfo.selection = {};
- plotinfo.selection.selectionDefs = dragOptions.selectionDefs = [];
- plotinfo.selection.mergedPolygons = dragOptions.mergedPolygons = [];
-}
-
-function determineSearchTraces(gd, xAxes, yAxes, subplot) {
- var searchTraces = [];
- var xAxisIds = xAxes.map(function(ax) { return ax._id; });
- var yAxisIds = yAxes.map(function(ax) { return ax._id; });
- var cd, trace, i;
-
- for(i = 0; i < gd.calcdata.length; i++) {
- cd = gd.calcdata[i];
- trace = cd[0].trace;
-
- if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
-
- if(subplot && (trace.subplot === subplot || trace.geo === subplot)) {
- searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
- } else if(
- trace.type === 'splom' &&
- // FIXME: make sure we don't have more than single axis for splom
- trace._xaxes[xAxisIds[0]] && trace._yaxes[yAxisIds[0]]
- ) {
- var info = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
- info.scene = gd._fullLayout._splomScenes[trace.uid];
- searchTraces.push(info);
- } else if(
- trace.type === 'sankey'
- ) {
- var sankeyInfo = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
- searchTraces.push(sankeyInfo);
- } else {
- if(xAxisIds.indexOf(trace.xaxis) === -1) continue;
- if(yAxisIds.indexOf(trace.yaxis) === -1) continue;
-
- searchTraces.push(createSearchInfo(trace._module, cd,
- getFromId(gd, trace.xaxis), getFromId(gd, trace.yaxis)));
- }
- }
-
- return searchTraces;
-
- function createSearchInfo(module, calcData, xaxis, yaxis) {
- return {
- _module: module,
- cd: calcData,
- xaxis: xaxis,
- yaxis: yaxis
- };
- }
-}
-
-function isHoverDataSet(hoverData) {
- return hoverData &&
- Array.isArray(hoverData) &&
- hoverData[0].hoverOnBox !== true;
-}
-
-function extractClickedPtInfo(hoverData, searchTraces) {
- var hoverDatum = hoverData[0];
- var pointNumber = -1;
- var pointNumbers = [];
- var searchInfo, i;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- if(hoverDatum.fullData._expandedIndex === searchInfo.cd[0].trace._expandedIndex) {
- // Special case for box (and violin)
- if(hoverDatum.hoverOnBox === true) {
- break;
- }
-
- // Hint: in some traces like histogram, one graphical element
- // doesn't correspond to one particular data point, but to
- // bins of data points. Thus, hoverDatum can have a binNumber
- // property instead of pointNumber.
- if(hoverDatum.pointNumber !== undefined) {
- pointNumber = hoverDatum.pointNumber;
- } else if(hoverDatum.binNumber !== undefined) {
- pointNumber = hoverDatum.binNumber;
- pointNumbers = hoverDatum.pointNumbers;
- }
-
- break;
- }
- }
-
- return {
- pointNumber: pointNumber,
- pointNumbers: pointNumbers,
- searchInfo: searchInfo
- };
-}
-
-function isPointOrBinSelected(clickedPtInfo) {
- var trace = clickedPtInfo.searchInfo.cd[0].trace;
- var ptNum = clickedPtInfo.pointNumber;
- var ptNums = clickedPtInfo.pointNumbers;
- var ptNumsSet = ptNums.length > 0;
-
- // When pointsNumbers is set (e.g. histogram's binning),
- // it is assumed that when the first point of
- // a bin is selected, all others are as well
- var ptNumToTest = ptNumsSet ? ptNums[0] : ptNum;
-
- // TODO potential performance improvement
- // Primarily we need this function to determine if a click adds
- // or subtracts from a selection.
- // In cases `trace.selectedpoints` is a huge array, indexOf
- // might be slow. One remedy would be to introduce a hash somewhere.
- return trace.selectedpoints ? trace.selectedpoints.indexOf(ptNumToTest) > -1 : false;
-}
-
-function isOnlyThisBinSelected(searchTraces, clickedPtInfo) {
- var tracesWithSelectedPts = [];
- var searchInfo, trace, isSameTrace, i;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- if(searchInfo.cd[0].trace.selectedpoints && searchInfo.cd[0].trace.selectedpoints.length > 0) {
- tracesWithSelectedPts.push(searchInfo);
- }
- }
-
- if(tracesWithSelectedPts.length === 1) {
- isSameTrace = tracesWithSelectedPts[0] === clickedPtInfo.searchInfo;
- if(isSameTrace) {
- trace = clickedPtInfo.searchInfo.cd[0].trace;
- if(trace.selectedpoints.length === clickedPtInfo.pointNumbers.length) {
- for(i = 0; i < clickedPtInfo.pointNumbers.length; i++) {
- if(trace.selectedpoints.indexOf(clickedPtInfo.pointNumbers[i]) < 0) {
- return false;
- }
- }
- return true;
- }
- }
- }
-
- return false;
-}
-
-function isOnlyOnePointSelected(searchTraces) {
- var len = 0;
- var searchInfo, trace, i;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- trace = searchInfo.cd[0].trace;
- if(trace.selectedpoints) {
- if(trace.selectedpoints.length > 1) return false;
-
- len += trace.selectedpoints.length;
- if(len > 1) return false;
- }
- }
-
- return len === 1;
-}
-
-function updateSelectedState(gd, searchTraces, eventData) {
- var i, searchInfo, cd, trace;
-
- // before anything else, update preGUI if necessary
- for(i = 0; i < searchTraces.length; i++) {
- var fullInputTrace = searchTraces[i].cd[0].trace._fullInput;
- var tracePreGUI = gd._fullLayout._tracePreGUI[fullInputTrace.uid] || {};
- if(tracePreGUI.selectedpoints === undefined) {
- tracePreGUI.selectedpoints = fullInputTrace._input.selectedpoints || null;
- }
- }
-
- if(eventData) {
- var pts = eventData.points || [];
-
- for(i = 0; i < searchTraces.length; i++) {
- trace = searchTraces[i].cd[0].trace;
- trace._input.selectedpoints = trace._fullInput.selectedpoints = [];
- if(trace._fullInput !== trace) trace.selectedpoints = [];
- }
-
- for(i = 0; i < pts.length; i++) {
- var pt = pts[i];
- var data = pt.data;
- var fullData = pt.fullData;
-
- if(pt.pointIndices) {
- [].push.apply(data.selectedpoints, pt.pointIndices);
- if(trace._fullInput !== trace) {
- [].push.apply(fullData.selectedpoints, pt.pointIndices);
- }
- } else {
- data.selectedpoints.push(pt.pointIndex);
- if(trace._fullInput !== trace) {
- fullData.selectedpoints.push(pt.pointIndex);
- }
- }
- }
- } else {
- for(i = 0; i < searchTraces.length; i++) {
- trace = searchTraces[i].cd[0].trace;
- delete trace.selectedpoints;
- delete trace._input.selectedpoints;
- if(trace._fullInput !== trace) {
- delete trace._fullInput.selectedpoints;
- }
- }
- }
-
- var hasRegl = false;
-
- for(i = 0; i < searchTraces.length; i++) {
- searchInfo = searchTraces[i];
- cd = searchInfo.cd;
- trace = cd[0].trace;
-
- if(Registry.traceIs(trace, 'regl')) {
- hasRegl = true;
- }
-
- var _module = searchInfo._module;
- var fn = _module.styleOnSelect || _module.style;
- if(fn) {
- fn(gd, cd, cd[0].node3);
- if(cd[0].nodeRangePlot3) fn(gd, cd, cd[0].nodeRangePlot3);
- }
- }
-
- if(hasRegl) {
- clearGlCanvases(gd);
- redrawReglTraces(gd);
- }
-}
-
-function mergePolygons(list, poly, subtract) {
- var res;
-
- if(subtract) {
- res = polybool.difference({
- regions: list,
- inverted: false
- }, {
- regions: [poly],
- inverted: false
- });
-
- return res.regions;
- }
-
- res = polybool.union({
- regions: list,
- inverted: false
- }, {
- regions: [poly],
- inverted: false
- });
-
- return res.regions;
-}
-
-function fillSelectionItem(selection, searchInfo) {
- if(Array.isArray(selection)) {
- var cd = searchInfo.cd;
- var trace = searchInfo.cd[0].trace;
-
- for(var i = 0; i < selection.length; i++) {
- selection[i] = makeEventData(selection[i], trace, cd);
- }
- }
-
- return selection;
-}
-
-function convertPoly(polygonsIn, isOpenMode) { // add M and L command to draft positions
- var polygonsOut = [];
- for(var i = 0; i < polygonsIn.length; i++) {
- polygonsOut[i] = [];
- for(var j = 0; j < polygonsIn[i].length; j++) {
- polygonsOut[i][j] = [];
- polygonsOut[i][j][0] = j ? 'L' : 'M';
- for(var k = 0; k < polygonsIn[i][j].length; k++) {
- polygonsOut[i][j].push(
- polygonsIn[i][j][k]
- );
- }
- }
-
- if(!isOpenMode) {
- polygonsOut[i].push([
- 'Z',
- polygonsOut[i][0][1], // initial x
- polygonsOut[i][0][2] // initial y
- ]);
- }
- }
-
- return polygonsOut;
-}
-
-module.exports = {
- prepSelect: prepSelect,
- clearSelect: clearSelect,
- clearSelectionsCache: clearSelectionsCache,
- selectOnClick: selectOnClick
-};
-
-},{"../../components/color":157,"../../components/dragelement/helpers":175,"../../components/drawing":179,"../../components/fx":197,"../../components/fx/helpers":193,"../../components/shapes/draw_newshape/display_outlines":245,"../../components/shapes/draw_newshape/helpers":246,"../../components/shapes/draw_newshape/newshapes":247,"../../lib":287,"../../lib/clear_gl_canvases":275,"../../lib/polygon":299,"../../lib/throttle":311,"../../plot_api/subroutines":324,"../../registry":378,"./axis_ids":338,"./constants":341,"./handle_outline":345,"./helpers":346,"polybooljs":75}],356:[function(_dereq_,module,exports){
+},{"../../constants/alignment":274}],365:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -77355,7 +78794,7 @@ module.exports = function setConvert(ax, fullLayout) {
delete ax._forceTick0;
};
-},{"../../constants/numerical":267,"../../lib":287,"./axis_ids":338,"./constants":341,"@plotly/d3":20,"d3-time-format":30,"fast-isnumeric":33}],357:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"./axis_ids":350,"./constants":353,"@plotly/d3":20,"d3-time-format":30,"fast-isnumeric":33}],366:[function(_dereq_,module,exports){
'use strict';
/*
@@ -77386,7 +78825,7 @@ module.exports = function getShowAttrDflt(containerIn) {
}
};
-},{}],358:[function(_dereq_,module,exports){
+},{}],367:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -77461,7 +78900,7 @@ function tickformatstopDefaults(valueIn, valueOut) {
}
}
-},{"../../components/color":157,"../../lib":287,"../array_container_defaults":329,"./layout_attributes":349,"./show_dflt":357}],359:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../array_container_defaults":341,"./layout_attributes":359,"./show_dflt":366}],368:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -77493,7 +78932,7 @@ module.exports = function handleTickMarkDefaults(containerIn, containerOut, coer
}
};
-},{"../../lib":287,"./layout_attributes":349}],360:[function(_dereq_,module,exports){
+},{"../../lib":299,"./layout_attributes":359}],369:[function(_dereq_,module,exports){
'use strict';
var cleanTicks = _dereq_('./clean_ticks');
@@ -77539,7 +78978,7 @@ module.exports = function handleTickValueDefaults(containerIn, containerOut, coe
}
};
-},{"../../lib":287,"./clean_ticks":340}],361:[function(_dereq_,module,exports){
+},{"../../lib":299,"./clean_ticks":352}],370:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -77744,7 +79183,7 @@ module.exports = function transitionAxes(gd, edits, transitionOpts, makeOnComple
return Promise.resolve();
};
-},{"../../components/drawing":179,"../../lib":287,"../../registry":378,"./axes":334,"@plotly/d3":20}],362:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"../../registry":387,"./axes":346,"@plotly/d3":20}],371:[function(_dereq_,module,exports){
'use strict';
var traceIs = _dereq_('../../registry').traceIs;
@@ -77876,7 +79315,7 @@ function isBoxWithoutPositionCoords(trace, axLetter) {
);
}
-},{"../../registry":378,"./axis_autotype":335}],363:[function(_dereq_,module,exports){
+},{"../../registry":387,"./axis_autotype":347}],372:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -78295,7 +79734,7 @@ function crawl(attrs, callback, path, depth) {
});
}
-},{"../lib":287,"../registry":378}],364:[function(_dereq_,module,exports){
+},{"../lib":299,"../registry":387}],373:[function(_dereq_,module,exports){
'use strict';
var extendFlat = _dereq_('../lib/extend').extendFlat;
@@ -78392,7 +79831,7 @@ exports.defaults = function(containerOut, layout, coerce, dfltDomains) {
if(!(y[0] < y[1])) containerOut.domain.y = dfltY.slice();
};
-},{"../lib/extend":281}],365:[function(_dereq_,module,exports){
+},{"../lib/extend":293}],374:[function(_dereq_,module,exports){
'use strict';
/*
@@ -78447,7 +79886,7 @@ module.exports = function(opts) {
return attrs;
};
-},{}],366:[function(_dereq_,module,exports){
+},{}],375:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -78473,7 +79912,7 @@ module.exports = {
}
};
-},{}],367:[function(_dereq_,module,exports){
+},{}],376:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -78594,7 +80033,7 @@ exports.getSubplotData = function getSubplotData(data, type, subplotId) {
return subplotData;
};
-},{"../registry":378,"./cartesian/constants":341}],368:[function(_dereq_,module,exports){
+},{"../registry":387,"./cartesian/constants":353}],377:[function(_dereq_,module,exports){
'use strict';
function xformMatrix(m, v) {
@@ -78619,13 +80058,14 @@ function project(camera, v) {
module.exports = project;
-},{}],369:[function(_dereq_,module,exports){
+},{}],378:[function(_dereq_,module,exports){
'use strict';
var fontAttrs = _dereq_('./font_attributes');
var animationAttrs = _dereq_('./animation_attributes');
var colorAttrs = _dereq_('../components/color/attributes');
var drawNewShapeAttrs = _dereq_('../components/shapes/draw_newshape/attributes');
+var drawNewSelectionAttrs = _dereq_('../components/selections/draw_newselection/attributes');
var padAttrs = _dereq_('./pad_attributes');
var extendFlat = _dereq_('../lib/extend').extendFlat;
@@ -78827,6 +80267,9 @@ module.exports = {
newshape: drawNewShapeAttrs.newshape,
activeshape: drawNewShapeAttrs.activeshape,
+ newselection: drawNewSelectionAttrs.newselection,
+ activeselection: drawNewSelectionAttrs.activeselection,
+
meta: {
valType: 'any',
arrayOk: true,
@@ -78847,7 +80290,7 @@ module.exports = {
}
};
-},{"../components/color/attributes":156,"../components/shapes/draw_newshape/attributes":242,"../lib/extend":281,"./animation_attributes":328,"./font_attributes":365,"./pad_attributes":370}],370:[function(_dereq_,module,exports){
+},{"../components/color/attributes":157,"../components/selections/draw_newselection/attributes":242,"../components/shapes/draw_newshape/attributes":254,"../lib/extend":293,"./animation_attributes":340,"./font_attributes":374,"./pad_attributes":379}],379:[function(_dereq_,module,exports){
'use strict';
/**
@@ -78886,7 +80329,7 @@ module.exports = function(opts) {
};
};
-},{}],371:[function(_dereq_,module,exports){
+},{}],380:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -78902,7 +80345,7 @@ var Color = _dereq_('../components/color');
var BADNUM = _dereq_('../constants/numerical').BADNUM;
var axisIDs = _dereq_('./cartesian/axis_ids');
-var clearSelect = _dereq_('./cartesian/handle_outline').clearSelect;
+var clearOutline = _dereq_('../components/shapes/handle_outline').clearOutline;
var animationAttrs = _dereq_('./animation_attributes');
var frameAttrs = _dereq_('./frame_attributes');
@@ -79370,7 +80813,7 @@ plots.supplyDefaults = function(gd, opts) {
// we should try to come up with a better solution when implementing
// https://github.com/plotly/plotly.js/issues/1851
if(oldFullLayout._zoomlayer && !gd._dragging) {
- clearSelect({ // mock old gd
+ clearOutline({ // mock old gd
_fullLayout: oldFullLayout
});
}
@@ -80428,6 +81871,11 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {
'supplyDrawNewShapeDefaults'
)(layoutIn, layoutOut, coerce);
+ Registry.getComponentMethod(
+ 'selections',
+ 'supplyDrawNewSelectionDefaults'
+ )(layoutIn, layoutOut, coerce);
+
coerce('meta');
// do not include defaults in fullLayout when users do not set transition
@@ -81790,6 +83238,7 @@ function _transition(gd, transitionOpts, opts) {
interruptPreviousTransitions,
opts.prepareFn,
plots.rehover,
+ plots.reselect,
executeTransitions
];
@@ -82246,6 +83695,10 @@ plots.redrag = function(gd) {
}
};
+plots.reselect = function(gd) {
+ Registry.getComponentMethod('selections', 'reselect')(gd);
+};
+
plots.generalUpdatePerTraceModule = function(gd, subplot, subplotCalcData, subplotLayout) {
var traceHashOld = subplot.traceHash;
var traceHash = {};
@@ -82304,7 +83757,7 @@ plots.cleanBasePlot = function(desiredType, newFullData, newFullLayout, oldFullD
}
};
-},{"../components/color":157,"../constants/numerical":267,"../lib":287,"../plot_api/plot_schema":322,"../plot_api/plot_template":323,"../plots/get_data":367,"../registry":378,"./animation_attributes":328,"./attributes":330,"./cartesian/axis_ids":338,"./cartesian/handle_outline":345,"./command":363,"./font_attributes":365,"./frame_attributes":366,"./layout_attributes":369,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],372:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/shapes/handle_outline":259,"../constants/numerical":279,"../lib":299,"../plot_api/plot_schema":334,"../plot_api/plot_template":335,"../plots/get_data":376,"../registry":387,"./animation_attributes":340,"./attributes":342,"./cartesian/axis_ids":350,"./command":372,"./font_attributes":374,"./frame_attributes":375,"./layout_attributes":378,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],381:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -82376,7 +83829,7 @@ module.exports = function handleSubplotDefaults(layoutIn, layoutOut, fullData, o
}
};
-},{"../lib":287,"../plot_api/plot_template":323,"./domain":364}],373:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_template":335,"./domain":373}],382:[function(_dereq_,module,exports){
'use strict';
var docs = _dereq_('../constants/docs');
@@ -82457,7 +83910,7 @@ exports.texttemplateAttrs = function(opts, extra) {
return texttemplate;
};
-},{"../constants/docs":264}],374:[function(_dereq_,module,exports){
+},{"../constants/docs":276}],383:[function(_dereq_,module,exports){
'use strict';
var Ternary = _dereq_('./ternary');
@@ -82530,7 +83983,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)
}
};
-},{"../../lib":287,"../../plots/get_data":367,"./layout_attributes":375,"./layout_defaults":376,"./ternary":377}],375:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/get_data":376,"./layout_attributes":384,"./layout_defaults":385,"./ternary":386}],384:[function(_dereq_,module,exports){
'use strict';
var colorAttrs = _dereq_('../../components/color/attributes');
@@ -82622,7 +84075,7 @@ attrs.aaxis.uirevision = attrs.baxis.uirevision = attrs.caxis.uirevision = {
editType: 'none',
};
-},{"../../components/color/attributes":156,"../../lib/extend":281,"../../plot_api/edit_types":316,"../cartesian/layout_attributes":349,"../domain":364}],376:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plot_api/edit_types":328,"../cartesian/layout_attributes":359,"../domain":373}],385:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -82748,7 +84201,7 @@ function handleAxisDefaults(containerIn, containerOut, options, ternaryLayoutOut
coerce('layer');
}
-},{"../../components/color":157,"../../lib":287,"../../plot_api/plot_template":323,"../cartesian/line_grid_defaults":351,"../cartesian/prefix_suffix_defaults":353,"../cartesian/tick_label_defaults":358,"../cartesian/tick_mark_defaults":359,"../cartesian/tick_value_defaults":360,"../subplot_defaults":372,"./layout_attributes":375}],377:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../plot_api/plot_template":335,"../cartesian/line_grid_defaults":361,"../cartesian/prefix_suffix_defaults":363,"../cartesian/tick_label_defaults":367,"../cartesian/tick_mark_defaults":368,"../cartesian/tick_value_defaults":369,"../subplot_defaults":381,"./layout_attributes":384}],386:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -82770,10 +84223,10 @@ var dragHelpers = _dereq_('../../components/dragelement/helpers');
var freeMode = dragHelpers.freeMode;
var rectMode = dragHelpers.rectMode;
var Titles = _dereq_('../../components/titles');
-var prepSelect = _dereq_('../cartesian/select').prepSelect;
-var selectOnClick = _dereq_('../cartesian/select').selectOnClick;
-var clearSelect = _dereq_('../cartesian/select').clearSelect;
-var clearSelectionsCache = _dereq_('../cartesian/select').clearSelectionsCache;
+var prepSelect = _dereq_('../../components/selections').prepSelect;
+var selectOnClick = _dereq_('../../components/selections').selectOnClick;
+var clearOutline = _dereq_('../../components/selections').clearOutline;
+var clearSelectionsCache = _dereq_('../../components/selections').clearSelectionsCache;
var constants = _dereq_('../cartesian/constants');
function Ternary(options, fullLayout) {
@@ -83235,9 +84688,9 @@ var STARTMARKER = 'm0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z';
// I guess this could be shared with cartesian... but for now it's separate.
var SHOWZOOMOUTTIP = true;
-proto.clearSelect = function() {
+proto.clearOutline = function() {
clearSelectionsCache(this.dragOptions);
- clearSelect(this.dragOptions.gd);
+ clearOutline(this.dragOptions.gd);
};
proto.initInteractions = function() {
@@ -83283,7 +84736,7 @@ proto.initInteractions = function() {
_this.dragOptions.clickFn = clickZoomPan;
_this.dragOptions.doneFn = dragDone;
panPrep();
- _this.clearSelect(gd);
+ _this.clearOutline(gd);
} else if(rectMode(dragModeNow) || freeMode(dragModeNow)) {
prepSelect(e, startX, startY, _this.dragOptions, dragModeNow);
}
@@ -83361,7 +84814,7 @@ proto.initInteractions = function() {
})
.attr('d', 'M0,0Z');
- _this.clearSelect(gd);
+ _this.clearOutline(gd);
}
function getAFrac(x, y) { return 1 - (y / _this.h); }
@@ -83520,7 +84973,7 @@ function removeZoombox(gd) {
.remove();
}
-},{"../../components/color":157,"../../components/dragelement":176,"../../components/dragelement/helpers":175,"../../components/drawing":179,"../../components/fx":197,"../../components/titles":255,"../../lib":287,"../../lib/extend":281,"../../registry":378,"../cartesian/axes":334,"../cartesian/constants":341,"../cartesian/select":355,"../cartesian/set_convert":356,"../plots":371,"@plotly/d3":20,"tinycolor2":121}],378:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/dragelement":177,"../../components/dragelement/helpers":176,"../../components/drawing":180,"../../components/fx":198,"../../components/selections":246,"../../components/titles":267,"../../lib":299,"../../lib/extend":293,"../../registry":387,"../cartesian/axes":346,"../cartesian/constants":353,"../cartesian/set_convert":365,"../plots":380,"@plotly/d3":20,"tinycolor2":122}],387:[function(_dereq_,module,exports){
'use strict';
var Loggers = _dereq_('./lib/loggers');
@@ -83978,7 +85431,7 @@ function getTraceType(traceType) {
return traceType;
}
-},{"./lib/dom":279,"./lib/extend":281,"./lib/is_plain_object":288,"./lib/loggers":291,"./lib/noop":296,"./lib/push_unique":301,"./plots/attributes":330,"./plots/layout_attributes":369}],379:[function(_dereq_,module,exports){
+},{"./lib/dom":291,"./lib/extend":293,"./lib/is_plain_object":300,"./lib/loggers":303,"./lib/noop":308,"./lib/push_unique":313,"./plots/attributes":342,"./plots/layout_attributes":378}],388:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -84138,7 +85591,7 @@ module.exports = function clonePlot(graphObj, options) {
return plotTile;
};
-},{"../lib":287,"../registry":378}],380:[function(_dereq_,module,exports){
+},{"../lib":299,"../registry":387}],389:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -84202,7 +85655,7 @@ function downloadImage(gd, opts) {
module.exports = downloadImage;
-},{"../lib":287,"../plot_api/to_image":326,"./filesaver":381,"./helpers":382}],381:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/to_image":338,"./filesaver":390,"./helpers":391}],390:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -84270,7 +85723,7 @@ function fileSaver(url, name, format) {
module.exports = fileSaver;
-},{"../lib":287,"./helpers":382}],382:[function(_dereq_,module,exports){
+},{"../lib":299,"./helpers":391}],391:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../registry');
@@ -84339,7 +85792,7 @@ exports.IMAGE_URL_PREFIX = /^data:image\/\w+;base64,/;
exports.MSG_IE_BAD_FORMAT = 'Sorry IE does not support downloading from canvas. Try {format:\'svg\'} instead.';
-},{"../registry":378}],383:[function(_dereq_,module,exports){
+},{"../registry":387}],392:[function(_dereq_,module,exports){
'use strict';
var helpers = _dereq_('./helpers');
@@ -84356,7 +85809,7 @@ var Snapshot = {
module.exports = Snapshot;
-},{"./cloneplot":379,"./download":380,"./helpers":382,"./svgtoimg":384,"./toimage":385,"./tosvg":386}],384:[function(_dereq_,module,exports){
+},{"./cloneplot":388,"./download":389,"./helpers":391,"./svgtoimg":393,"./toimage":394,"./tosvg":395}],393:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -84475,7 +85928,7 @@ function svgToImg(opts) {
module.exports = svgToImg;
-},{"../lib":287,"./helpers":382,"events":27}],385:[function(_dereq_,module,exports){
+},{"../lib":299,"./helpers":391,"events":27}],394:[function(_dereq_,module,exports){
'use strict';
var EventEmitter = _dereq_('events').EventEmitter;
@@ -84544,7 +85997,7 @@ function toImage(gd, opts) {
module.exports = toImage;
-},{"../lib":287,"../registry":378,"./cloneplot":379,"./helpers":382,"./svgtoimg":384,"./tosvg":386,"events":27}],386:[function(_dereq_,module,exports){
+},{"../lib":299,"../registry":387,"./cloneplot":388,"./helpers":391,"./svgtoimg":393,"./tosvg":395,"events":27}],395:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -84718,7 +86171,7 @@ module.exports = function toSVG(gd, format, scale) {
return s;
};
-},{"../components/color":157,"../components/drawing":179,"../constants/xmlns_namespaces":268,"../lib":287,"@plotly/d3":20}],387:[function(_dereq_,module,exports){
+},{"../components/color":158,"../components/drawing":180,"../constants/xmlns_namespaces":280,"../lib":299,"@plotly/d3":20}],396:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -84743,7 +86196,7 @@ module.exports = function arraysToCalcdata(cd, trace) {
}
};
-},{"../../lib":287}],388:[function(_dereq_,module,exports){
+},{"../../lib":299}],397:[function(_dereq_,module,exports){
'use strict';
var scatterAttrs = _dereq_('../scatter/attributes');
@@ -84924,7 +86377,7 @@ module.exports = {
}
};
-},{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../scatter/attributes":500,"./constants":390}],389:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../scatter/attributes":509,"./constants":399}],398:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -84999,7 +86452,7 @@ module.exports = function calc(gd, trace) {
return cd;
};
-},{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../scatter/calc_selection":502,"./arrays_to_calcdata":387}],390:[function(_dereq_,module,exports){
+},{"../../components/colorscale/calc":166,"../../components/colorscale/helpers":169,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"../scatter/calc_selection":511,"./arrays_to_calcdata":396}],399:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -85012,7 +86465,7 @@ module.exports = {
eventDataKeys: ['value', 'label']
};
-},{}],391:[function(_dereq_,module,exports){
+},{}],400:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -85787,7 +87240,7 @@ module.exports = {
setGroupPositions: setGroupPositions
};
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../../plots/cartesian/constraints":342,"../../registry":378,"./sieve.js":401,"fast-isnumeric":33}],392:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../../plots/cartesian/constraints":354,"../../registry":387,"./sieve.js":410,"fast-isnumeric":33}],401:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -85966,7 +87419,7 @@ module.exports = {
handleText: handleText
};
-},{"../../components/color":157,"../../lib":287,"../../plots/cartesian/constraints":342,"../../registry":378,"../scatter/period_defaults":520,"../scatter/xy_defaults":527,"./attributes":388,"./style_defaults":403}],393:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../plots/cartesian/constraints":354,"../../registry":387,"../scatter/period_defaults":529,"../scatter/xy_defaults":536,"./attributes":397,"./style_defaults":412}],402:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt, trace) {
@@ -85987,7 +87440,7 @@ module.exports = function eventData(out, pt, trace) {
return out;
};
-},{}],394:[function(_dereq_,module,exports){
+},{}],403:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -86057,7 +87510,7 @@ exports.getLineWidth = function(trace, di) {
return w;
};
-},{"../../lib":287,"fast-isnumeric":33,"tinycolor2":121}],395:[function(_dereq_,module,exports){
+},{"../../lib":299,"fast-isnumeric":33,"tinycolor2":122}],404:[function(_dereq_,module,exports){
'use strict';
var Fx = _dereq_('../../components/fx');
@@ -86282,7 +87735,7 @@ module.exports = {
getTraceColor: getTraceColor
};
-},{"../../components/color":157,"../../components/fx":197,"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"./helpers":394}],396:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx":198,"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./helpers":403}],405:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -86311,7 +87764,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../scatter/marker_colorbar":518,"./arrays_to_calcdata":387,"./attributes":388,"./calc":389,"./cross_trace_calc":391,"./defaults":392,"./event_data":393,"./hover":395,"./layout_attributes":397,"./layout_defaults":398,"./plot":399,"./select":400,"./style":402}],397:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../scatter/marker_colorbar":527,"./arrays_to_calcdata":396,"./attributes":397,"./calc":398,"./cross_trace_calc":400,"./defaults":401,"./event_data":402,"./hover":404,"./layout_attributes":406,"./layout_defaults":407,"./plot":408,"./select":409,"./style":411}],406:[function(_dereq_,module,exports){
'use strict';
@@ -86343,7 +87796,7 @@ module.exports = {
}
};
-},{}],398:[function(_dereq_,module,exports){
+},{}],407:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -86395,7 +87848,7 @@ module.exports = function(layoutIn, layoutOut, fullData) {
coerce('bargroupgap');
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"./layout_attributes":397}],399:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./layout_attributes":406}],408:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -87179,7 +88632,7 @@ module.exports = {
toMoveInsideBar: toMoveInsideBar
};
-},{"../../components/color":157,"../../components/drawing":179,"../../components/fx/helpers":193,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../registry":378,"./attributes":388,"./constants":390,"./helpers":394,"./style":402,"./uniform_text":404,"@plotly/d3":20,"fast-isnumeric":33}],400:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../components/fx/helpers":194,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"./attributes":397,"./constants":399,"./helpers":403,"./style":411,"./uniform_text":413,"@plotly/d3":20,"fast-isnumeric":33}],409:[function(_dereq_,module,exports){
'use strict';
module.exports = function selectPoints(searchInfo, selectionTester) {
@@ -87235,7 +88688,7 @@ function getCentroid(d, xa, ya, isHorizontal, isFunnel) {
}
}
-},{}],401:[function(_dereq_,module,exports){
+},{}],410:[function(_dereq_,module,exports){
'use strict';
module.exports = Sieve;
@@ -87344,7 +88797,7 @@ Sieve.prototype.getLabel = function getLabel(position, value) {
return prefix + label;
};
-},{"../../constants/numerical":267,"../../lib":287}],402:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299}],411:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -87518,7 +88971,7 @@ module.exports = {
resizeText: resizeText
};
-},{"../../components/color":157,"../../components/drawing":179,"../../lib":287,"../../registry":378,"./attributes":388,"./helpers":394,"./uniform_text":404,"@plotly/d3":20}],403:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../lib":299,"../../registry":387,"./attributes":397,"./helpers":403,"./uniform_text":413,"@plotly/d3":20}],412:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -87550,7 +89003,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, default
coerce('unselected.marker.color');
};
-},{"../../components/color":157,"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"../../lib":287}],404:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"../../lib":299}],413:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -87629,7 +89082,7 @@ module.exports = {
resizeText: resizeText
};
-},{"../../lib":287,"@plotly/d3":20}],405:[function(_dereq_,module,exports){
+},{"../../lib":299,"@plotly/d3":20}],414:[function(_dereq_,module,exports){
'use strict';
var scatterAttrs = _dereq_('../scatter/attributes');
@@ -87864,7 +89317,7 @@ module.exports = {
}
};
-},{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../bar/attributes":388,"../scatter/attributes":500}],406:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/template_attributes":382,"../bar/attributes":397,"../scatter/attributes":509}],415:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -88310,7 +89763,7 @@ function computeNotchSpan(cdi, N) {
return 1.57 * (cdi.q3 - cdi.q1) / Math.sqrt(N);
}
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"fast-isnumeric":33}],407:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"fast-isnumeric":33}],416:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -88535,7 +89988,7 @@ module.exports = {
setPositionOffset: setPositionOffset
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../plots/cartesian/constraints":342}],408:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../plots/cartesian/constraints":354}],417:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -88845,7 +90298,7 @@ module.exports = {
handlePointsDefaults: handlePointsDefaults
};
-},{"../../components/color":157,"../../lib":287,"../../plots/cartesian/axis_autotype":335,"../../registry":378,"../bar/defaults":392,"../scatter/period_defaults":520,"./attributes":405}],409:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../plots/cartesian/axis_autotype":347,"../../registry":387,"../bar/defaults":401,"../scatter/period_defaults":529,"./attributes":414}],418:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt) {
@@ -88862,7 +90315,7 @@ module.exports = function eventData(out, pt) {
return out;
};
-},{}],410:[function(_dereq_,module,exports){
+},{}],419:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -88909,7 +90362,6 @@ function hoverOnBoxes(pointData, xval, yval, hovermode) {
var trace = cd[0].trace;
var t = cd[0].t;
var isViolin = trace.type === 'violin';
- var closeBoxData = [];
var pLetter, vLetter, pAxis, vAxis, vVal, pVal, dx, dy, dPos,
hoverPseudoDistance, spikePseudoDistance;
@@ -89006,22 +90458,30 @@ function hoverOnBoxes(pointData, xval, yval, hovermode) {
pointData.spikeDistance = dxy(di) * spikePseudoDistance / hoverPseudoDistance;
pointData[spikePosAttr] = pAxis.c2p(di.pos, true);
- // box plots: each "point" gets many labels
- var usedVals = {};
- var attrs = ['med', 'q1', 'q3', 'min', 'max'];
+ var hasMean = trace.boxmean || (trace.meanline || {}).visible;
+ var hasFences = trace.boxpoints || trace.points;
- if(trace.boxmean || (trace.meanline || {}).visible) {
- attrs.push('mean');
- }
- if(trace.boxpoints || trace.points) {
- attrs.push('lf', 'uf');
+ // labels with equal values (e.g. when min === q1) should still be presented in the order they have when they're unequal
+ var attrs =
+ (hasFences && hasMean) ? ['max', 'uf', 'q3', 'med', 'mean', 'q1', 'lf', 'min'] :
+ (hasFences && !hasMean) ? ['max', 'uf', 'q3', 'med', 'q1', 'lf', 'min'] :
+ (!hasFences && hasMean) ? ['max', 'q3', 'med', 'mean', 'q1', 'min'] :
+ ['max', 'q3', 'med', 'q1', 'min'];
+
+ var rev = vAxis.range[1] < vAxis.range[0];
+
+ if(trace.orientation === (rev ? 'v' : 'h')) {
+ attrs.reverse();
}
+ var spikeDistance = pointData.spikeDistance;
+ var spikePosition = pointData[spikePosAttr];
+
+ var closeBoxData = [];
for(var i = 0; i < attrs.length; i++) {
var attr = attrs[i];
- if(!(attr in di) || (di[attr] in usedVals)) continue;
- usedVals[di[attr]] = true;
+ if(!(attr in di)) continue;
// copy out to a new object for each value to label
var val = di[attr];
@@ -89041,17 +90501,27 @@ function hoverOnBoxes(pointData, xval, yval, hovermode) {
pointData2[vLetter + 'err'] = di.sd;
}
- // only keep name and spikes on the first item (median)
- pointData.name = '';
- pointData.spikeDistance = undefined;
- pointData[spikePosAttr] = undefined;
-
// no hovertemplate support yet
pointData2.hovertemplate = false;
closeBoxData.push(pointData2);
}
+ // only keep name and spikes on the median
+ pointData.name = '';
+ pointData.spikeDistance = undefined;
+ pointData[spikePosAttr] = undefined;
+ for(var k = 0; k < closeBoxData.length; k++) {
+ if(closeBoxData[k].attr !== 'med') {
+ closeBoxData[k].name = '';
+ closeBoxData[k].spikeDistance = undefined;
+ closeBoxData[k][spikePosAttr] = undefined;
+ } else {
+ closeBoxData[k].spikeDistance = spikeDistance;
+ closeBoxData[k][spikePosAttr] = spikePosition;
+ }
+ }
+
return closeBoxData;
}
@@ -89141,7 +90611,7 @@ module.exports = {
hoverOnPoints: hoverOnPoints
};
-},{"../../components/color":157,"../../components/fx":197,"../../lib":287,"../../plots/cartesian/axes":334}],411:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx":198,"../../lib":299,"../../plots/cartesian/axes":346}],420:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -89167,7 +90637,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":405,"./calc":406,"./cross_trace_calc":407,"./defaults":408,"./event_data":409,"./hover":410,"./layout_attributes":412,"./layout_defaults":413,"./plot":414,"./select":415,"./style":416}],412:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":414,"./calc":415,"./cross_trace_calc":416,"./defaults":417,"./event_data":418,"./hover":419,"./layout_attributes":421,"./layout_defaults":422,"./plot":423,"./select":424,"./style":425}],421:[function(_dereq_,module,exports){
'use strict';
@@ -89194,7 +90664,7 @@ module.exports = {
}
};
-},{}],413:[function(_dereq_,module,exports){
+},{}],422:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -89232,7 +90702,7 @@ module.exports = {
_supply: _supply
};
-},{"../../lib":287,"../../registry":378,"./layout_attributes":412}],414:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./layout_attributes":421}],423:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -89574,7 +91044,7 @@ module.exports = {
plotBoxMean: plotBoxMean
};
-},{"../../components/drawing":179,"../../lib":287,"@plotly/d3":20}],415:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"@plotly/d3":20}],424:[function(_dereq_,module,exports){
'use strict';
module.exports = function selectPoints(searchInfo, selectionTester) {
@@ -89615,7 +91085,7 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
return selection;
};
-},{}],416:[function(_dereq_,module,exports){
+},{}],425:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -89681,7 +91151,7 @@ module.exports = {
styleOnSelect: styleOnSelect
};
-},{"../../components/color":157,"../../components/drawing":179,"@plotly/d3":20}],417:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"@plotly/d3":20}],426:[function(_dereq_,module,exports){
'use strict';
var heatmapAttrs = _dereq_('../heatmap/attributes');
@@ -89845,7 +91315,7 @@ module.exports = extendFlat({
})
);
-},{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../constants/filter_ops":265,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../heatmap/attributes":439,"../scatter/attributes":500}],418:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../constants/filter_ops":277,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../heatmap/attributes":448,"../scatter/attributes":509}],427:[function(_dereq_,module,exports){
'use strict';
var Colorscale = _dereq_('../../components/colorscale');
@@ -89890,7 +91360,7 @@ module.exports = function calc(gd, trace) {
return cd;
};
-},{"../../components/colorscale":169,"../heatmap/calc":440,"./end_plus":428,"./set_contours":436}],419:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"../heatmap/calc":449,"./end_plus":437,"./set_contours":445}],428:[function(_dereq_,module,exports){
'use strict';
module.exports = function(pathinfo, contours) {
@@ -89972,7 +91442,7 @@ module.exports = function(pathinfo, contours) {
}
};
-},{}],420:[function(_dereq_,module,exports){
+},{}],429:[function(_dereq_,module,exports){
'use strict';
var Colorscale = _dereq_('../../components/colorscale');
@@ -90015,7 +91485,7 @@ module.exports = {
calc: calc
};
-},{"../../components/colorscale":169,"./end_plus":428,"./make_color_map":433}],421:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"./end_plus":437,"./make_color_map":442}],430:[function(_dereq_,module,exports){
'use strict';
module.exports = {
// some constants to help with marching squares algorithm
@@ -90085,7 +91555,7 @@ module.exports = {
}
};
-},{}],422:[function(_dereq_,module,exports){
+},{}],431:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -90170,7 +91640,7 @@ function handleConstraintValueDefaults(coerce, contours) {
}
}
-},{"../../components/color":157,"../../constants/filter_ops":265,"./label_defaults":432,"fast-isnumeric":33}],423:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../constants/filter_ops":277,"./label_defaults":441,"fast-isnumeric":33}],432:[function(_dereq_,module,exports){
'use strict';
var filterOps = _dereq_('../../constants/filter_ops');
@@ -90241,7 +91711,7 @@ function makeInequalitySettings(operation) {
};
}
-},{"../../constants/filter_ops":265,"fast-isnumeric":33}],424:[function(_dereq_,module,exports){
+},{"../../constants/filter_ops":277,"fast-isnumeric":33}],433:[function(_dereq_,module,exports){
'use strict';
module.exports = function handleContourDefaults(traceIn, traceOut, coerce, coerce2) {
@@ -90262,7 +91732,7 @@ module.exports = function handleContourDefaults(traceIn, traceOut, coerce, coerc
if(autoContour || !contourSize) coerce('ncontours');
};
-},{}],425:[function(_dereq_,module,exports){
+},{}],434:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90354,7 +91824,7 @@ function copyPathinfo(pi) {
});
}
-},{"../../lib":287}],426:[function(_dereq_,module,exports){
+},{"../../lib":299}],435:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90410,7 +91880,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
}
};
-},{"../../lib":287,"../heatmap/label_defaults":449,"../heatmap/xyz_defaults":454,"../scatter/period_defaults":520,"./attributes":417,"./constraint_defaults":422,"./contours_defaults":424,"./style_defaults":438}],427:[function(_dereq_,module,exports){
+},{"../../lib":299,"../heatmap/label_defaults":458,"../heatmap/xyz_defaults":463,"../scatter/period_defaults":529,"./attributes":426,"./constraint_defaults":431,"./contours_defaults":433,"./style_defaults":447}],436:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90466,7 +91936,7 @@ module.exports = function emptyPathinfo(contours, plotinfo, cd0) {
return pathinfo;
};
-},{"../../lib":287,"./constraint_mapping":423,"./end_plus":428}],428:[function(_dereq_,module,exports){
+},{"../../lib":299,"./constraint_mapping":432,"./end_plus":437}],437:[function(_dereq_,module,exports){
'use strict';
/*
@@ -90477,7 +91947,7 @@ module.exports = function endPlus(contours) {
return contours.end + contours.size / 1e6;
};
-},{}],429:[function(_dereq_,module,exports){
+},{}],438:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90772,7 +92242,7 @@ function getInterpPx(pi, loc, step) {
}
}
-},{"../../lib":287,"./constants":421}],430:[function(_dereq_,module,exports){
+},{"../../lib":299,"./constants":430}],439:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -90801,7 +92271,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return hoverData;
};
-},{"../../components/color":157,"../heatmap/hover":446}],431:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../heatmap/hover":455}],440:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -90821,7 +92291,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":417,"./calc":418,"./colorbar":420,"./defaults":426,"./hover":430,"./plot":435,"./style":437}],432:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":426,"./calc":427,"./colorbar":429,"./defaults":435,"./hover":439,"./plot":444,"./style":446}],441:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -90842,7 +92312,7 @@ module.exports = function handleLabelDefaults(coerce, layout, lineColor, opts) {
if(opts.hasHover !== false) coerce('zhoverformat');
};
-},{"../../lib":287}],433:[function(_dereq_,module,exports){
+},{"../../lib":299}],442:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -90918,7 +92388,7 @@ module.exports = function makeColorMap(trace) {
);
};
-},{"../../components/colorscale":169,"./end_plus":428,"@plotly/d3":20}],434:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"./end_plus":437,"@plotly/d3":20}],443:[function(_dereq_,module,exports){
'use strict';
var constants = _dereq_('./constants');
@@ -91002,7 +92472,7 @@ function getMarchingIndex(val, corners) {
return (mi === 15) ? 0 : mi;
}
-},{"./constants":421}],435:[function(_dereq_,module,exports){
+},{"./constants":430}],444:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -91684,7 +93154,7 @@ function makeClipMask(cd0) {
return z;
}
-},{"../../components/colorscale":169,"../../components/drawing":179,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../plots/cartesian/set_convert":356,"../heatmap/plot":451,"./close_boundaries":419,"./constants":421,"./convert_to_constraints":425,"./empty_pathinfo":427,"./find_all_paths":429,"./make_crossings":434,"@plotly/d3":20}],436:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"../../components/drawing":180,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../plots/cartesian/set_convert":365,"../heatmap/plot":460,"./close_boundaries":428,"./constants":430,"./convert_to_constraints":434,"./empty_pathinfo":436,"./find_all_paths":438,"./make_crossings":443,"@plotly/d3":20}],445:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -91780,7 +93250,7 @@ function autoContours(start, end, ncontours) {
return dummyAx;
}
-},{"../../lib":287,"../../plots/cartesian/axes":334}],437:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346}],446:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -91852,7 +93322,7 @@ module.exports = function style(gd) {
heatmapStyle(gd);
};
-},{"../../components/drawing":179,"../heatmap/style":452,"./make_color_map":433,"@plotly/d3":20}],438:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../heatmap/style":461,"./make_color_map":442,"@plotly/d3":20}],447:[function(_dereq_,module,exports){
'use strict';
var colorscaleDefaults = _dereq_('../../components/colorscale/defaults');
@@ -91888,7 +93358,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout,
handleLabelDefaults(coerce, layout, lineColor, opts);
};
-},{"../../components/colorscale/defaults":167,"./label_defaults":432}],439:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"./label_defaults":441}],448:[function(_dereq_,module,exports){
'use strict';
var scatterAttrs = _dereq_('../scatter/attributes');
@@ -91995,7 +93465,7 @@ module.exports = extendFlat({
colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
);
-},{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../scatter/attributes":500}],440:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../scatter/attributes":509}],449:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -92196,7 +93666,7 @@ function dropZonBreaks(x, y, z) {
return newZ;
}
-},{"../../components/colorscale/calc":165,"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../../registry":378,"../histogram2d/calc":469,"./clean_2d_array":441,"./convert_column_xyz":443,"./find_empties":445,"./interp2d":448,"./make_bound_array":450}],441:[function(_dereq_,module,exports){
+},{"../../components/colorscale/calc":166,"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"../../registry":387,"../histogram2d/calc":478,"./clean_2d_array":450,"./convert_column_xyz":452,"./find_empties":454,"./interp2d":457,"./make_bound_array":459}],450:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -92265,7 +93735,7 @@ module.exports = function clean2dArray(zOld, trace, xa, ya) {
return zNew;
};
-},{"../../constants/numerical":267,"../../lib":287,"fast-isnumeric":33}],442:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],451:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -92273,7 +93743,7 @@ module.exports = {
max: 'zmax'
};
-},{}],443:[function(_dereq_,module,exports){
+},{}],452:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92354,7 +93824,7 @@ module.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name,
trace._after2before = after2before;
};
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331}],444:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343}],453:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92395,7 +93865,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
};
-},{"../../components/colorscale/defaults":167,"../../lib":287,"../scatter/period_defaults":520,"./attributes":439,"./label_defaults":449,"./style_defaults":453,"./xyz_defaults":454}],445:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"../../lib":299,"../scatter/period_defaults":529,"./attributes":448,"./label_defaults":458,"./style_defaults":462,"./xyz_defaults":463}],454:[function(_dereq_,module,exports){
'use strict';
var maxRowLength = _dereq_('../../lib').maxRowLength;
@@ -92492,7 +93962,7 @@ module.exports = function findEmpties(z) {
return empties.sort(function(a, b) { return b[2] - a[2]; });
};
-},{"../../lib":287}],446:[function(_dereq_,module,exports){
+},{"../../lib":299}],455:[function(_dereq_,module,exports){
'use strict';
var Fx = _dereq_('../../components/fx');
@@ -92625,7 +94095,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
})];
};
-},{"../../components/colorscale":169,"../../components/fx":197,"../../lib":287,"../../plots/cartesian/axes":334}],447:[function(_dereq_,module,exports){
+},{"../../components/colorscale":170,"../../components/fx":198,"../../lib":299,"../../plots/cartesian/axes":346}],456:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -92645,7 +94115,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":439,"./calc":440,"./colorbar":442,"./defaults":444,"./hover":446,"./plot":451,"./style":452}],448:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":448,"./calc":449,"./colorbar":451,"./defaults":453,"./hover":455,"./plot":460,"./style":461}],457:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92770,7 +94240,7 @@ function iterateInterp2d(z, emptyPoints, overshoot) {
return maxFractionalChange;
}
-},{"../../lib":287}],449:[function(_dereq_,module,exports){
+},{"../../lib":299}],458:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -92785,7 +94255,7 @@ module.exports = function handleHeatmapLabelDefaults(coerce, layout) {
Lib.coerceFont(coerce, 'textfont', fontDflt);
};
-},{"../../lib":287}],450:[function(_dereq_,module,exports){
+},{"../../lib":299}],459:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -92865,7 +94335,7 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks,
return arrayOut;
};
-},{"../../lib":287,"../../registry":378}],451:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],460:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -93462,7 +94932,7 @@ function putColor(pixels, pxIndex, c) {
pixels[pxIndex + 3] = Math.round(c[3] * 255);
}
-},{"../../components/color":157,"../../components/colorscale":169,"../../components/drawing":179,"../../constants/alignment":262,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../registry":378,"../scatter/format_labels":509,"@plotly/d3":20,"tinycolor2":121}],452:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/colorscale":170,"../../components/drawing":180,"../../constants/alignment":274,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"../scatter/format_labels":518,"@plotly/d3":20,"tinycolor2":122}],461:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -93474,7 +94944,7 @@ module.exports = function style(gd) {
});
};
-},{"@plotly/d3":20}],453:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],462:[function(_dereq_,module,exports){
'use strict';
module.exports = function handleStyleDefaults(traceIn, traceOut, coerce) {
@@ -93488,7 +94958,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce) {
coerce('zhoverformat');
};
-},{}],454:[function(_dereq_,module,exports){
+},{}],463:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -93579,7 +95049,7 @@ function isValidZ(z) {
return (allRowsAreArrays && oneRowIsFilled && hasOneNumber);
}
-},{"../../lib":287,"../../registry":378,"fast-isnumeric":33}],455:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"fast-isnumeric":33}],464:[function(_dereq_,module,exports){
'use strict';
var barAttrs = _dereq_('../bar/attributes');
@@ -93729,7 +95199,7 @@ module.exports = {
}
};
-},{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../bar/attributes":388,"./bin_attributes":457,"./constants":461}],456:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../bar/attributes":397,"./bin_attributes":466,"./constants":470}],465:[function(_dereq_,module,exports){
'use strict';
@@ -93745,7 +95215,7 @@ module.exports = function doAvg(size, counts) {
return total;
};
-},{}],457:[function(_dereq_,module,exports){
+},{}],466:[function(_dereq_,module,exports){
'use strict';
module.exports = function makeBinAttrs(axLetter, match) {
@@ -93766,7 +95236,7 @@ module.exports = function makeBinAttrs(axLetter, match) {
};
};
-},{}],458:[function(_dereq_,module,exports){
+},{}],467:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -93831,7 +95301,7 @@ module.exports = {
}
};
-},{"fast-isnumeric":33}],459:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33}],468:[function(_dereq_,module,exports){
'use strict';
var numConstants = _dereq_('../../constants/numerical');
@@ -93998,7 +95468,7 @@ function dateParts(v, pa, calendar) {
return parts;
}
-},{"../../constants/numerical":267,"../../plots/cartesian/axes":334}],460:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../plots/cartesian/axes":346}],469:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -94570,14 +96040,14 @@ module.exports = {
calcAllAutoBins: calcAllAutoBins
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"../bar/arrays_to_calcdata":387,"./average":456,"./bin_functions":458,"./bin_label_vals":459,"./norm_functions":467,"fast-isnumeric":33}],461:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"../bar/arrays_to_calcdata":396,"./average":465,"./bin_functions":467,"./bin_label_vals":468,"./norm_functions":476,"fast-isnumeric":33}],470:[function(_dereq_,module,exports){
'use strict';
module.exports = {
eventDataKeys: ['binNumber']
};
-},{}],462:[function(_dereq_,module,exports){
+},{}],471:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -94846,7 +96316,7 @@ module.exports = function crossTraceDefaults(fullData, fullLayout) {
}
};
-},{"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../plots/cartesian/constraints":342,"../../registry":378,"../bar/defaults":392}],463:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../plots/cartesian/constraints":354,"../../registry":387,"../bar/defaults":401}],472:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -94925,7 +96395,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || Color.defaultLine, {axis: 'x', inherit: 'y'});
};
-},{"../../components/color":157,"../../lib":287,"../../registry":378,"../bar/defaults":392,"../bar/style_defaults":403,"./attributes":455}],464:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../../registry":387,"../bar/defaults":401,"../bar/style_defaults":412,"./attributes":464}],473:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt, trace, cd, pointNumber) {
@@ -94966,7 +96436,7 @@ module.exports = function eventData(out, pt, trace, cd, pointNumber) {
return out;
};
-},{}],465:[function(_dereq_,module,exports){
+},{}],474:[function(_dereq_,module,exports){
'use strict';
var barHover = _dereq_('../bar/hover').hoverPoints;
@@ -94990,7 +96460,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return pts;
};
-},{"../../plots/cartesian/axes":334,"../bar/hover":395}],466:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346,"../bar/hover":404}],475:[function(_dereq_,module,exports){
'use strict';
/**
@@ -95031,7 +96501,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../bar/cross_trace_calc":391,"../bar/layout_attributes":397,"../bar/layout_defaults":398,"../bar/plot":399,"../bar/select":400,"../bar/style":402,"../scatter/marker_colorbar":518,"./attributes":455,"./calc":460,"./cross_trace_defaults":462,"./defaults":463,"./event_data":464,"./hover":465}],467:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../bar/cross_trace_calc":400,"../bar/layout_attributes":406,"../bar/layout_defaults":407,"../bar/plot":408,"../bar/select":409,"../bar/style":411,"../scatter/marker_colorbar":527,"./attributes":464,"./calc":469,"./cross_trace_defaults":471,"./defaults":472,"./event_data":473,"./hover":474}],476:[function(_dereq_,module,exports){
'use strict';
@@ -95057,7 +96527,7 @@ module.exports = {
}
};
-},{}],468:[function(_dereq_,module,exports){
+},{}],477:[function(_dereq_,module,exports){
'use strict';
var histogramAttrs = _dereq_('../histogram/attributes');
@@ -95123,7 +96593,7 @@ module.exports = extendFlat(
colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
);
-},{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../heatmap/attributes":439,"../histogram/attributes":455,"../histogram/bin_attributes":457}],469:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/cartesian/axis_format_attributes":349,"../../plots/template_attributes":382,"../heatmap/attributes":448,"../histogram/attributes":464,"../histogram/bin_attributes":466}],478:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95334,7 +96804,7 @@ function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
return out;
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../histogram/average":456,"../histogram/bin_functions":458,"../histogram/bin_label_vals":459,"../histogram/calc":460,"../histogram/norm_functions":467}],470:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../histogram/average":465,"../histogram/bin_functions":467,"../histogram/bin_label_vals":468,"../histogram/calc":469,"../histogram/norm_functions":476}],479:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95364,7 +96834,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
coerce('yhoverformat');
};
-},{"../../components/colorscale/defaults":167,"../../lib":287,"../heatmap/label_defaults":449,"../heatmap/style_defaults":453,"./attributes":468,"./sample_defaults":473}],471:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"../../lib":299,"../heatmap/label_defaults":458,"../heatmap/style_defaults":462,"./attributes":477,"./sample_defaults":482}],480:[function(_dereq_,module,exports){
'use strict';
var heatmapHover = _dereq_('../heatmap/hover');
@@ -95390,7 +96860,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return pts;
};
-},{"../../plots/cartesian/axes":334,"../heatmap/hover":446}],472:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346,"../heatmap/hover":455}],481:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -95413,7 +96883,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../heatmap/calc":440,"../heatmap/colorbar":442,"../heatmap/plot":451,"../heatmap/style":452,"../histogram/cross_trace_defaults":462,"../histogram/event_data":464,"./attributes":468,"./defaults":470,"./hover":471}],473:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../heatmap/calc":449,"../heatmap/colorbar":451,"../heatmap/plot":460,"../heatmap/style":461,"../histogram/cross_trace_defaults":471,"../histogram/event_data":473,"./attributes":477,"./defaults":479,"./hover":480}],482:[function(_dereq_,module,exports){
'use strict';
var Registry = _dereq_('../../registry');
@@ -95450,7 +96920,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout
coerce('autobiny');
};
-},{"../../lib":287,"../../registry":378}],474:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],483:[function(_dereq_,module,exports){
'use strict';
var histogram2dAttrs = _dereq_('../histogram2d/attributes');
@@ -95504,7 +96974,7 @@ module.exports = extendFlat({
})
);
-},{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../contour/attributes":417,"../histogram2d/attributes":468}],475:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../contour/attributes":426,"../histogram2d/attributes":477}],484:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95541,7 +97011,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
}
};
-},{"../../lib":287,"../contour/contours_defaults":424,"../contour/style_defaults":438,"../heatmap/label_defaults":449,"../histogram2d/sample_defaults":473,"./attributes":474}],476:[function(_dereq_,module,exports){
+},{"../../lib":299,"../contour/contours_defaults":433,"../contour/style_defaults":447,"../heatmap/label_defaults":458,"../histogram2d/sample_defaults":482,"./attributes":483}],485:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -95563,7 +97033,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../contour/calc":418,"../contour/colorbar":420,"../contour/hover":430,"../contour/plot":435,"../contour/style":437,"../histogram/cross_trace_defaults":462,"./attributes":474,"./defaults":475}],477:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../contour/calc":427,"../contour/colorbar":429,"../contour/hover":439,"../contour/plot":444,"../contour/style":446,"../histogram/cross_trace_defaults":471,"./attributes":483,"./defaults":484}],486:[function(_dereq_,module,exports){
'use strict';
var baseAttrs = _dereq_('../../plots/attributes');
@@ -95659,7 +97129,7 @@ module.exports = extendFlat({
transforms: undefined
});
-},{"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"./constants":479}],478:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/attributes":342,"../../plots/template_attributes":382,"./constants":488}],487:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95749,7 +97219,7 @@ function makeScaler(trace) {
};
}
-},{"../../lib":287,"../../plots/cartesian/axes":334,"./constants":479,"./helpers":482,"fast-isnumeric":33}],479:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":488,"./helpers":491,"fast-isnumeric":33}],488:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -95815,7 +97285,7 @@ module.exports = {
].join('; ')
};
-},{}],480:[function(_dereq_,module,exports){
+},{}],489:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -95865,7 +97335,7 @@ module.exports = function supplyDefaults(traceIn, traceOut) {
traceOut._length = null;
};
-},{"../../lib":287,"../../snapshot/helpers":382,"./attributes":477,"./constants":479}],481:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../snapshot/helpers":391,"./attributes":486,"./constants":488}],490:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt) {
@@ -95879,7 +97349,7 @@ module.exports = function eventData(out, pt) {
return out;
};
-},{}],482:[function(_dereq_,module,exports){
+},{}],491:[function(_dereq_,module,exports){
'use strict';
var probeSync = _dereq_('probe-image-size/sync');
@@ -95892,7 +97362,7 @@ exports.getImageSize = function(src) {
return probeSync(buff);
};
-},{"../../snapshot/helpers":382,"buffer/":28,"probe-image-size/sync":97}],483:[function(_dereq_,module,exports){
+},{"../../snapshot/helpers":391,"buffer/":28,"probe-image-size/sync":98}],492:[function(_dereq_,module,exports){
'use strict';
var Fx = _dereq_('../../components/fx');
@@ -95984,7 +97454,7 @@ module.exports = function hoverPoints(pointData, xval, yval) {
})];
};
-},{"../../components/fx":197,"../../lib":287,"./constants":479}],484:[function(_dereq_,module,exports){
+},{"../../components/fx":198,"../../lib":299,"./constants":488}],493:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -96005,7 +97475,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./attributes":477,"./calc":478,"./defaults":480,"./event_data":481,"./hover":483,"./plot":485,"./style":486}],485:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./attributes":486,"./calc":487,"./defaults":489,"./event_data":490,"./hover":492,"./plot":494,"./style":495}],494:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -96228,7 +97698,7 @@ module.exports = function plot(gd, plotinfo, cdimage, imageLayer) {
});
};
-},{"../../constants/xmlns_namespaces":268,"../../lib":287,"./constants":479,"@plotly/d3":20}],486:[function(_dereq_,module,exports){
+},{"../../constants/xmlns_namespaces":280,"../../lib":299,"./constants":488,"@plotly/d3":20}],495:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -96240,7 +97710,7 @@ module.exports = function style(gd) {
});
};
-},{"@plotly/d3":20}],487:[function(_dereq_,module,exports){
+},{"@plotly/d3":20}],496:[function(_dereq_,module,exports){
'use strict';
var baseAttrs = _dereq_('../../plots/attributes');
@@ -96455,7 +97925,7 @@ module.exports = {
}
};
-},{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/domain":364,"../../plots/font_attributes":365,"../../plots/template_attributes":373}],488:[function(_dereq_,module,exports){
+},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/domain":373,"../../plots/font_attributes":374,"../../plots/template_attributes":382}],497:[function(_dereq_,module,exports){
'use strict';
var plots = _dereq_('../../plots/plots');
@@ -96470,7 +97940,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)
plots.cleanBasePlot(exports.name, newFullData, newFullLayout, oldFullData, oldFullLayout);
};
-},{"../../plots/plots":371}],489:[function(_dereq_,module,exports){
+},{"../../plots/plots":380}],498:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -96647,7 +98117,7 @@ module.exports = {
generateExtendedColors: generateExtendedColors
};
-},{"../../components/color":157,"fast-isnumeric":33,"tinycolor2":121}],490:[function(_dereq_,module,exports){
+},{"../../components/color":158,"fast-isnumeric":33,"tinycolor2":122}],499:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -96770,7 +98240,7 @@ module.exports = {
supplyDefaults: supplyDefaults
};
-},{"../../lib":287,"../../plots/domain":364,"../bar/defaults":392,"./attributes":487,"fast-isnumeric":33}],491:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/domain":373,"../bar/defaults":401,"./attributes":496,"fast-isnumeric":33}],500:[function(_dereq_,module,exports){
'use strict';
var appendArrayMultiPointValues = _dereq_('../../components/fx/helpers').appendArrayMultiPointValues;
@@ -96812,7 +98282,7 @@ module.exports = function eventData(pt, trace) {
return out;
};
-},{"../../components/fx/helpers":193}],492:[function(_dereq_,module,exports){
+},{"../../components/fx/helpers":194}],501:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -96852,7 +98322,7 @@ exports.getRotationAngle = function(rotation) {
return (rotation === 'auto' ? 0 : rotation) * Math.PI / 180;
};
-},{"../../lib":287}],493:[function(_dereq_,module,exports){
+},{"../../lib":299}],502:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -96876,7 +98346,7 @@ module.exports = {
}
};
-},{"./attributes":487,"./base_plot":488,"./calc":489,"./defaults":490,"./layout_attributes":494,"./layout_defaults":495,"./plot":496,"./style":497,"./style_one":498}],494:[function(_dereq_,module,exports){
+},{"./attributes":496,"./base_plot":497,"./calc":498,"./defaults":499,"./layout_attributes":503,"./layout_defaults":504,"./plot":505,"./style":506,"./style_one":507}],503:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -96895,7 +98365,7 @@ module.exports = {
}
};
-},{}],495:[function(_dereq_,module,exports){
+},{}],504:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -96912,7 +98382,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
coerce('extendpiecolors');
};
-},{"../../lib":287,"./layout_attributes":494}],496:[function(_dereq_,module,exports){
+},{"../../lib":299,"./layout_attributes":503}],505:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -98092,7 +99562,7 @@ module.exports = {
computeTransform: computeTransform
};
-},{"../../components/color":157,"../../components/drawing":179,"../../components/fx":197,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../bar/constants":390,"../bar/uniform_text":404,"./event_data":491,"./helpers":492,"@plotly/d3":20}],497:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/drawing":180,"../../components/fx":198,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../bar/constants":399,"../bar/uniform_text":413,"./event_data":500,"./helpers":501,"@plotly/d3":20}],506:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -98117,7 +99587,7 @@ module.exports = function style(gd) {
});
};
-},{"../bar/uniform_text":404,"./style_one":498,"@plotly/d3":20}],498:[function(_dereq_,module,exports){
+},{"../bar/uniform_text":413,"./style_one":507,"@plotly/d3":20}],507:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -98133,7 +99603,7 @@ module.exports = function styleOne(s, pt, trace) {
.call(Color.stroke, lineColor);
};
-},{"../../components/color":157,"./helpers":492}],499:[function(_dereq_,module,exports){
+},{"../../components/color":158,"./helpers":501}],508:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -98176,7 +99646,7 @@ module.exports = function arraysToCalcdata(cd, trace) {
}
};
-},{"../../lib":287}],500:[function(_dereq_,module,exports){
+},{"../../lib":299}],509:[function(_dereq_,module,exports){
'use strict';
var axisHoverFormat = _dereq_('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
@@ -98528,7 +99998,7 @@ module.exports = {
}),
};
-},{"../../components/colorscale/attributes":164,"../../components/drawing":179,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"./constants":504}],501:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing":180,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"./constants":513}],510:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -98825,7 +100295,7 @@ module.exports = {
getStackOpts: getStackOpts
};
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"./arrays_to_calcdata":499,"./calc_selection":502,"./colorscale_calc":503,"./subtypes":525,"fast-isnumeric":33}],502:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"./arrays_to_calcdata":508,"./calc_selection":511,"./colorscale_calc":512,"./subtypes":534,"fast-isnumeric":33}],511:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -98836,7 +100306,7 @@ module.exports = function calcSelection(cd, trace) {
}
};
-},{"../../lib":287}],503:[function(_dereq_,module,exports){
+},{"../../lib":299}],512:[function(_dereq_,module,exports){
'use strict';
var hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;
@@ -98871,7 +100341,7 @@ module.exports = function calcMarkerColorscale(gd, trace) {
}
};
-},{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"./subtypes":525}],504:[function(_dereq_,module,exports){
+},{"../../components/colorscale/calc":166,"../../components/colorscale/helpers":169,"./subtypes":534}],513:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -98891,7 +100361,7 @@ module.exports = {
eventDataKeys: []
};
-},{}],505:[function(_dereq_,module,exports){
+},{}],514:[function(_dereq_,module,exports){
'use strict';
var calc = _dereq_('./calc');
@@ -99063,7 +100533,7 @@ function getInterp(calcTrace, index, position, posAttr) {
return pt0.s + (pt1.s - pt0.s) * (position - pt0[posAttr]) / (pt1[posAttr] - pt0[posAttr]);
}
-},{"./calc":501}],506:[function(_dereq_,module,exports){
+},{"./calc":510}],515:[function(_dereq_,module,exports){
'use strict';
@@ -99093,7 +100563,7 @@ module.exports = function crossTraceDefaults(fullData) {
}
};
-},{}],507:[function(_dereq_,module,exports){
+},{}],516:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -99182,7 +100652,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
Lib.coerceSelectionMarkerOpacity(traceOut, coerce);
};
-},{"../../lib":287,"../../registry":378,"./attributes":500,"./constants":504,"./fillcolor_defaults":508,"./line_defaults":513,"./line_shape_defaults":515,"./marker_defaults":519,"./period_defaults":520,"./stack_defaults":523,"./subtypes":525,"./text_defaults":526,"./xy_defaults":527}],508:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387,"./attributes":509,"./constants":513,"./fillcolor_defaults":517,"./line_defaults":522,"./line_shape_defaults":524,"./marker_defaults":528,"./period_defaults":529,"./stack_defaults":532,"./subtypes":534,"./text_defaults":535,"./xy_defaults":536}],517:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -99210,7 +100680,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe
));
};
-},{"../../components/color":157,"../../lib":287}],509:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299}],518:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -99228,7 +100698,7 @@ module.exports = function formatLabels(cdi, trace, fullLayout) {
return labels;
};
-},{"../../plots/cartesian/axes":334}],510:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346}],519:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -99268,7 +100738,7 @@ module.exports = function getTraceColor(trace, di) {
}
};
-},{"../../components/color":157,"./subtypes":525}],511:[function(_dereq_,module,exports){
+},{"../../components/color":158,"./subtypes":534}],520:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -99479,7 +100949,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
}
};
-},{"../../components/color":157,"../../components/fx":197,"../../lib":287,"../../registry":378,"./get_trace_color":510}],512:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/fx":198,"../../lib":299,"../../registry":387,"./get_trace_color":519}],521:[function(_dereq_,module,exports){
'use strict';
var subtypes = _dereq_('./subtypes');
@@ -99516,7 +100986,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"./arrays_to_calcdata":499,"./attributes":500,"./calc":501,"./cross_trace_calc":505,"./cross_trace_defaults":506,"./defaults":507,"./format_labels":509,"./hover":511,"./marker_colorbar":518,"./plot":521,"./select":522,"./style":524,"./subtypes":525}],513:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"./arrays_to_calcdata":508,"./attributes":509,"./calc":510,"./cross_trace_calc":514,"./cross_trace_defaults":515,"./defaults":516,"./format_labels":518,"./hover":520,"./marker_colorbar":527,"./plot":530,"./select":531,"./style":533,"./subtypes":534}],522:[function(_dereq_,module,exports){
'use strict';
var isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;
@@ -99539,7 +101009,7 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout,
if(!(opts || {}).noDash) coerce('line.dash');
};
-},{"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"../../lib":287}],514:[function(_dereq_,module,exports){
+},{"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"../../lib":299}],523:[function(_dereq_,module,exports){
'use strict';
var numConstants = _dereq_('../../constants/numerical');
@@ -99991,7 +101461,7 @@ module.exports = function linePoints(d, opts) {
return segments;
};
-},{"../../constants/numerical":267,"../../lib":287,"./constants":504}],515:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"./constants":513}],524:[function(_dereq_,module,exports){
'use strict';
@@ -100001,7 +101471,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) {
if(shape === 'spline') coerce('line.smoothing');
};
-},{}],516:[function(_dereq_,module,exports){
+},{}],525:[function(_dereq_,module,exports){
'use strict';
var LINKEDFILLS = {tonextx: 1, tonexty: 1, tonext: 1};
@@ -100083,7 +101553,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) {
return cdscatterSorted;
};
-},{}],517:[function(_dereq_,module,exports){
+},{}],526:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -100119,7 +101589,7 @@ module.exports = function makeBubbleSizeFn(trace, factor) {
};
};
-},{"fast-isnumeric":33}],518:[function(_dereq_,module,exports){
+},{"fast-isnumeric":33}],527:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -100128,7 +101598,7 @@ module.exports = {
max: 'cmax'
};
-},{}],519:[function(_dereq_,module,exports){
+},{}],528:[function(_dereq_,module,exports){
'use strict';
var Color = _dereq_('../../components/color');
@@ -100201,7 +101671,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout
}
};
-},{"../../components/color":157,"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"./subtypes":525}],520:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"./subtypes":534}],529:[function(_dereq_,module,exports){
'use strict';
var dateTick0 = _dereq_('../../lib').dateTick0;
@@ -100240,7 +101710,7 @@ module.exports = function handlePeriodDefaults(traceIn, traceOut, layout, coerce
}
};
-},{"../../constants/numerical":267,"../../lib":287}],521:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299}],530:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -100792,7 +102262,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) {
});
}
-},{"../../components/drawing":179,"../../lib":287,"../../lib/polygon":299,"../../registry":378,"./line_points":514,"./link_traces":516,"./subtypes":525,"@plotly/d3":20}],522:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"../../lib/polygon":311,"../../registry":387,"./line_points":523,"./link_traces":525,"./subtypes":534,"@plotly/d3":20}],531:[function(_dereq_,module,exports){
'use strict';
var subtypes = _dereq_('./subtypes');
@@ -100837,7 +102307,7 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
return selection;
};
-},{"./subtypes":525}],523:[function(_dereq_,module,exports){
+},{"./subtypes":534}],532:[function(_dereq_,module,exports){
'use strict';
var perStackAttrs = ['orientation', 'groupnorm', 'stackgaps'];
@@ -100934,7 +102404,7 @@ module.exports = function handleStackDefaults(traceIn, traceOut, layout, coerce)
}
};
-},{}],524:[function(_dereq_,module,exports){
+},{}],533:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -100996,7 +102466,7 @@ module.exports = {
styleOnSelect: styleOnSelect
};
-},{"../../components/drawing":179,"../../registry":378,"@plotly/d3":20}],525:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../registry":387,"@plotly/d3":20}],534:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101026,7 +102496,7 @@ module.exports = {
}
};
-},{"../../lib":287}],526:[function(_dereq_,module,exports){
+},{"../../lib":299}],535:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101047,7 +102517,7 @@ module.exports = function(traceIn, traceOut, layout, coerce, opts) {
}
};
-},{"../../lib":287}],527:[function(_dereq_,module,exports){
+},{"../../lib":299}],536:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101083,7 +102553,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
return len;
};
-},{"../../lib":287,"../../registry":378}],528:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../registry":387}],537:[function(_dereq_,module,exports){
'use strict';
var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplateAttrs;
@@ -101175,7 +102645,7 @@ module.exports = {
hovertemplate: hovertemplateAttrs(),
};
-},{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"../scatter/attributes":500}],529:[function(_dereq_,module,exports){
+},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/template_attributes":382,"../scatter/attributes":509}],538:[function(_dereq_,module,exports){
'use strict';
var isNumeric = _dereq_('fast-isnumeric');
@@ -101247,7 +102717,7 @@ module.exports = function calc(gd, trace) {
return cd;
};
-},{"../scatter/arrays_to_calcdata":499,"../scatter/calc":501,"../scatter/calc_selection":502,"../scatter/colorscale_calc":503,"fast-isnumeric":33}],530:[function(_dereq_,module,exports){
+},{"../scatter/arrays_to_calcdata":508,"../scatter/calc":510,"../scatter/calc_selection":511,"../scatter/colorscale_calc":512,"fast-isnumeric":33}],539:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101342,7 +102812,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
Lib.coerceSelectionMarkerOpacity(traceOut, coerce);
};
-},{"../../lib":287,"../scatter/constants":504,"../scatter/fillcolor_defaults":508,"../scatter/line_defaults":513,"../scatter/line_shape_defaults":515,"../scatter/marker_defaults":519,"../scatter/subtypes":525,"../scatter/text_defaults":526,"./attributes":528}],531:[function(_dereq_,module,exports){
+},{"../../lib":299,"../scatter/constants":513,"../scatter/fillcolor_defaults":517,"../scatter/line_defaults":522,"../scatter/line_shape_defaults":524,"../scatter/marker_defaults":528,"../scatter/subtypes":534,"../scatter/text_defaults":535,"./attributes":537}],540:[function(_dereq_,module,exports){
'use strict';
module.exports = function eventData(out, pt, trace, cd, pointNumber) {
@@ -101366,7 +102836,7 @@ module.exports = function eventData(out, pt, trace, cd, pointNumber) {
return out;
};
-},{}],532:[function(_dereq_,module,exports){
+},{}],541:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../../plots/cartesian/axes');
@@ -101382,7 +102852,7 @@ module.exports = function formatLabels(cdi, trace, fullLayout) {
return labels;
};
-},{"../../plots/cartesian/axes":334}],533:[function(_dereq_,module,exports){
+},{"../../plots/cartesian/axes":346}],542:[function(_dereq_,module,exports){
'use strict';
var scatterHover = _dereq_('../scatter/hover');
@@ -101448,7 +102918,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
return scatterPointData;
};
-},{"../scatter/hover":511}],534:[function(_dereq_,module,exports){
+},{"../scatter/hover":520}],543:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -101472,7 +102942,7 @@ module.exports = {
}
};
-},{"../../plots/ternary":374,"../scatter/marker_colorbar":518,"../scatter/select":522,"../scatter/style":524,"./attributes":528,"./calc":529,"./defaults":530,"./event_data":531,"./format_labels":532,"./hover":533,"./plot":535}],535:[function(_dereq_,module,exports){
+},{"../../plots/ternary":383,"../scatter/marker_colorbar":527,"../scatter/select":531,"../scatter/style":533,"./attributes":537,"./calc":538,"./defaults":539,"./event_data":540,"./format_labels":541,"./hover":542,"./plot":544}],544:[function(_dereq_,module,exports){
'use strict';
var scatterPlot = _dereq_('../scatter/plot');
@@ -101496,7 +102966,7 @@ module.exports = function plot(gd, ternary, moduleCalcData) {
scatterPlot(gd, plotinfo, moduleCalcData, scatterLayer);
};
-},{"../scatter/plot":521}],536:[function(_dereq_,module,exports){
+},{"../scatter/plot":530}],545:[function(_dereq_,module,exports){
'use strict';
var boxAttrs = _dereq_('../box/attributes');
@@ -101580,6 +103050,8 @@ module.exports = {
hovertext: boxAttrs.hovertext,
hovertemplate: boxAttrs.hovertemplate,
+ quartilemethod: boxAttrs.quartilemethod,
+
box: {
visible: {
valType: 'boolean',
@@ -101652,7 +103124,7 @@ module.exports = {
}
};
-},{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../box/attributes":405}],537:[function(_dereq_,module,exports){
+},{"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../box/attributes":414}],546:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101820,7 +103292,7 @@ function calcSpan(trace, cdi, valAxis, bandwidth) {
return spanOut;
}
-},{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../box/calc":406,"./helpers":540}],538:[function(_dereq_,module,exports){
+},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../box/calc":415,"./helpers":549}],547:[function(_dereq_,module,exports){
'use strict';
var setPositionOffset = _dereq_('../box/cross_trace_calc').setPositionOffset;
@@ -101855,7 +103327,7 @@ module.exports = function crossTraceCalc(gd, plotinfo) {
}
};
-},{"../box/cross_trace_calc":407}],539:[function(_dereq_,module,exports){
+},{"../box/cross_trace_calc":416}],548:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101906,9 +103378,11 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
var meanLineWidth = coerce2('meanline.width', lineWidth);
var meanLineVisible = coerce('meanline.visible', Boolean(meanLineColor || meanLineWidth));
if(!meanLineVisible) traceOut.meanline = {visible: false};
+
+ coerce('quartilemethod');
};
-},{"../../components/color":157,"../../lib":287,"../box/defaults":408,"./attributes":536}],540:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../../lib":299,"../box/defaults":417,"./attributes":545}],549:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -101973,7 +103447,7 @@ exports.getKdeValue = function(calcItem, trace, valueDist) {
exports.extractVal = function(o) { return o.v; };
-},{"../../lib":287}],541:[function(_dereq_,module,exports){
+},{"../../lib":299}],550:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -102032,11 +103506,19 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
kdePointData[vLetter + 'Label'] = vLetter + ': ' + Axes.hoverLabelText(vAxis, vVal, trace[vLetter + 'hoverformat']) + ', ' + cd[0].t.labels.kde + ' ' + kdeVal.toFixed(3);
// move the spike to the KDE point
- kdePointData.spikeDistance = closeBoxData[0].spikeDistance;
+ var medId = 0;
+ for(var k = 0; k < closeBoxData.length; k++) {
+ if(closeBoxData[k].attr === 'med') {
+ medId = k;
+ break;
+ }
+ }
+
+ kdePointData.spikeDistance = closeBoxData[medId].spikeDistance;
var spikePosAttr = pLetter + 'Spike';
- kdePointData[spikePosAttr] = closeBoxData[0][spikePosAttr];
- closeBoxData[0].spikeDistance = undefined;
- closeBoxData[0][spikePosAttr] = undefined;
+ kdePointData[spikePosAttr] = closeBoxData[medId][spikePosAttr];
+ closeBoxData[medId].spikeDistance = undefined;
+ closeBoxData[medId][spikePosAttr] = undefined;
// no hovertemplate support yet
kdePointData.hovertemplate = false;
@@ -102080,7 +103562,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
return closeData;
};
-},{"../../lib":287,"../../plots/cartesian/axes":334,"../box/hover":410,"./helpers":540}],542:[function(_dereq_,module,exports){
+},{"../../lib":299,"../../plots/cartesian/axes":346,"../box/hover":419,"./helpers":549}],551:[function(_dereq_,module,exports){
'use strict';
module.exports = {
@@ -102105,7 +103587,7 @@ module.exports = {
}
};
-},{"../../plots/cartesian":348,"../box/defaults":408,"../box/select":415,"../scatter/style":524,"./attributes":536,"./calc":537,"./cross_trace_calc":538,"./defaults":539,"./hover":541,"./layout_attributes":543,"./layout_defaults":544,"./plot":545,"./style":546}],543:[function(_dereq_,module,exports){
+},{"../../plots/cartesian":358,"../box/defaults":417,"../box/select":424,"../scatter/style":533,"./attributes":545,"./calc":546,"./cross_trace_calc":547,"./defaults":548,"./hover":550,"./layout_attributes":552,"./layout_defaults":553,"./plot":554,"./style":555}],552:[function(_dereq_,module,exports){
'use strict';
var boxLayoutAttrs = _dereq_('../box/layout_attributes');
@@ -102120,7 +103602,7 @@ module.exports = {
})
};
-},{"../../lib":287,"../box/layout_attributes":412}],544:[function(_dereq_,module,exports){
+},{"../../lib":299,"../box/layout_attributes":421}],553:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../../lib');
@@ -102134,7 +103616,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
boxLayoutDefaults._supply(layoutIn, layoutOut, fullData, coerce, 'violin');
};
-},{"../../lib":287,"../box/layout_defaults":413,"./layout_attributes":543}],545:[function(_dereq_,module,exports){
+},{"../../lib":299,"../box/layout_defaults":422,"./layout_attributes":552}],554:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -102316,7 +103798,7 @@ module.exports = function plot(gd, plotinfo, cdViolins, violinLayer) {
});
};
-},{"../../components/drawing":179,"../../lib":287,"../box/plot":414,"../scatter/line_points":514,"./helpers":540,"@plotly/d3":20}],546:[function(_dereq_,module,exports){
+},{"../../components/drawing":180,"../../lib":299,"../box/plot":423,"../scatter/line_points":523,"./helpers":549,"@plotly/d3":20}],555:[function(_dereq_,module,exports){
'use strict';
var d3 = _dereq_('@plotly/d3');
@@ -102363,7 +103845,7 @@ module.exports = function style(gd) {
});
};
-},{"../../components/color":157,"../scatter/style":524,"@plotly/d3":20}],547:[function(_dereq_,module,exports){
+},{"../../components/color":158,"../scatter/style":533,"@plotly/d3":20}],556:[function(_dereq_,module,exports){
'use strict';
var Axes = _dereq_('../plots/cartesian/axes');
@@ -102767,7 +104249,7 @@ function last(array, indices) {
return array[indices[indices.length - 1]];
}
-},{"../constants/numerical":267,"../lib":287,"../plot_api/plot_schema":322,"../plots/cartesian/axes":334,"./helpers":550}],548:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"../lib":299,"../plot_api/plot_schema":334,"../plots/cartesian/axes":346,"./helpers":559}],557:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -103027,7 +104509,7 @@ function getFilterFunc(opts, d2c, targetCalendar) {
}
}
-},{"../constants/filter_ops":265,"../lib":287,"../plots/cartesian/axes":334,"../registry":378,"./helpers":550}],549:[function(_dereq_,module,exports){
+},{"../constants/filter_ops":277,"../lib":299,"../plots/cartesian/axes":346,"../registry":387,"./helpers":559}],558:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -103271,7 +104753,7 @@ function transformOne(trace, state) {
return newData;
}
-},{"../lib":287,"../plot_api/plot_schema":322,"../plots/plots":371,"./helpers":550}],550:[function(_dereq_,module,exports){
+},{"../lib":299,"../plot_api/plot_schema":334,"../plots/plots":380,"./helpers":559}],559:[function(_dereq_,module,exports){
'use strict';
exports.pointsAccessorFunction = function(transforms, opts) {
@@ -103289,7 +104771,7 @@ exports.pointsAccessorFunction = function(transforms, opts) {
return originalPointsAccessor;
};
-},{}],551:[function(_dereq_,module,exports){
+},{}],560:[function(_dereq_,module,exports){
'use strict';
var Lib = _dereq_('../lib');
@@ -103427,11 +104909,11 @@ function getSortFunc(opts, d2c) {
}
}
-},{"../constants/numerical":267,"../lib":287,"../plots/cartesian/axes":334,"./helpers":550}],552:[function(_dereq_,module,exports){
+},{"../constants/numerical":279,"../lib":299,"../plots/cartesian/axes":346,"./helpers":559}],561:[function(_dereq_,module,exports){
'use strict';
// package version injected by `npm run preprocess`
-exports.version = '2.12.1';
+exports.version = '2.13.2';
},{}]},{},[15])(15)
});
diff --git a/static/babybuddy/js/graph.js.gz b/static/babybuddy/js/graph.js.gz
index cb12d977..a1821bb8 100644
Binary files a/static/babybuddy/js/graph.js.gz and b/static/babybuddy/js/graph.js.gz differ
diff --git a/static/babybuddy/js/vendor.c2389e01b831.js b/static/babybuddy/js/vendor.6f561e43be7c.js
similarity index 99%
rename from static/babybuddy/js/vendor.c2389e01b831.js
rename to static/babybuddy/js/vendor.6f561e43be7c.js
index f14bed25..1bc309d3 100644
--- a/static/babybuddy/js/vendor.c2389e01b831.js
+++ b/static/babybuddy/js/vendor.6f561e43be7c.js
@@ -13921,8 +13921,8 @@ return Popper;
/*!
- * Bootstrap v4.6.1 (https://getbootstrap.com/)
- * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap v4.6.2 (https://getbootstrap.com/)
+ * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
@@ -13949,11 +13949,14 @@ return Popper;
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
+ Object.defineProperty(Constructor, "prototype", {
+ writable: false
+ });
return Constructor;
}
function _extends() {
- _extends = Object.assign || function (target) {
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
@@ -13966,7 +13969,6 @@ return Popper;
return target;
};
-
return _extends.apply(this, arguments);
}
@@ -13978,17 +13980,16 @@ return Popper;
}
function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
-
return _setPrototypeOf(o, p);
}
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.1): util.js
+ * Bootstrap (v4.6.2): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -14162,7 +14163,7 @@ return Popper;
*/
var NAME$a = 'alert';
- var VERSION$a = '4.6.1';
+ var VERSION$a = '4.6.2';
var DATA_KEY$a = 'bs.alert';
var EVENT_KEY$a = "." + DATA_KEY$a;
var DATA_API_KEY$7 = '.data-api';
@@ -14310,7 +14311,7 @@ return Popper;
*/
var NAME$9 = 'button';
- var VERSION$9 = '4.6.1';
+ var VERSION$9 = '4.6.2';
var DATA_KEY$9 = 'bs.button';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$6 = '.data-api';
@@ -14501,7 +14502,7 @@ return Popper;
*/
var NAME$8 = 'carousel';
- var VERSION$8 = '4.6.1';
+ var VERSION$8 = '4.6.2';
var DATA_KEY$8 = 'bs.carousel';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$5 = '.data-api';
@@ -15088,7 +15089,7 @@ return Popper;
*/
var NAME$7 = 'collapse';
- var VERSION$7 = '4.6.1';
+ var VERSION$7 = '4.6.2';
var DATA_KEY$7 = 'bs.collapse';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var DATA_API_KEY$4 = '.data-api';
@@ -15429,7 +15430,7 @@ return Popper;
*/
var NAME$6 = 'dropdown';
- var VERSION$6 = '4.6.1';
+ var VERSION$6 = '4.6.2';
var DATA_KEY$6 = 'bs.dropdown';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var DATA_API_KEY$3 = '.data-api';
@@ -15932,7 +15933,7 @@ return Popper;
*/
var NAME$5 = 'modal';
- var VERSION$5 = '4.6.1';
+ var VERSION$5 = '4.6.2';
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$2 = '.data-api';
@@ -16536,7 +16537,7 @@ return Popper;
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.1): tools/sanitizer.js
+ * Bootstrap (v4.6.2): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16661,7 +16662,7 @@ return Popper;
*/
var NAME$4 = 'tooltip';
- var VERSION$4 = '4.6.1';
+ var VERSION$4 = '4.6.2';
var DATA_KEY$4 = 'bs.tooltip';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4];
@@ -17371,7 +17372,7 @@ return Popper;
*/
var NAME$3 = 'popover';
- var VERSION$3 = '4.6.1';
+ var VERSION$3 = '4.6.2';
var DATA_KEY$3 = 'bs.popover';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3];
@@ -17545,7 +17546,7 @@ return Popper;
*/
var NAME$2 = 'scrollspy';
- var VERSION$2 = '4.6.1';
+ var VERSION$2 = '4.6.2';
var DATA_KEY$2 = 'bs.scrollspy';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$1 = '.data-api';
@@ -17631,9 +17632,7 @@ return Popper;
}
return null;
- }).filter(function (item) {
- return item;
- }).sort(function (a, b) {
+ }).filter(Boolean).sort(function (a, b) {
return a[0] - b[0];
}).forEach(function (item) {
_this2._offsets.push(item[0]);
@@ -17829,7 +17828,7 @@ return Popper;
*/
var NAME$1 = 'tab';
- var VERSION$1 = '4.6.1';
+ var VERSION$1 = '4.6.2';
var DATA_KEY$1 = 'bs.tab';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY = '.data-api';
@@ -17867,7 +17866,7 @@ return Popper;
_proto.show = function show() {
var _this = this;
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED)) {
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || this._element.hasAttribute('disabled')) {
return;
}
@@ -18053,7 +18052,7 @@ return Popper;
*/
var NAME = 'toast';
- var VERSION = '4.6.1';
+ var VERSION = '4.6.2';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
diff --git a/static/babybuddy/js/vendor.c2389e01b831.js.gz b/static/babybuddy/js/vendor.6f561e43be7c.js.gz
similarity index 54%
rename from static/babybuddy/js/vendor.c2389e01b831.js.gz
rename to static/babybuddy/js/vendor.6f561e43be7c.js.gz
index a05569e6..ca48d05a 100644
Binary files a/static/babybuddy/js/vendor.c2389e01b831.js.gz and b/static/babybuddy/js/vendor.6f561e43be7c.js.gz differ
diff --git a/static/babybuddy/js/vendor.js b/static/babybuddy/js/vendor.js
index 821df5a7..9f52d236 100644
--- a/static/babybuddy/js/vendor.js
+++ b/static/babybuddy/js/vendor.js
@@ -13921,8 +13921,8 @@ return Popper;
/*!
- * Bootstrap v4.6.1 (https://getbootstrap.com/)
- * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap v4.6.2 (https://getbootstrap.com/)
+ * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
@@ -13949,11 +13949,14 @@ return Popper;
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
+ Object.defineProperty(Constructor, "prototype", {
+ writable: false
+ });
return Constructor;
}
function _extends() {
- _extends = Object.assign || function (target) {
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
@@ -13966,7 +13969,6 @@ return Popper;
return target;
};
-
return _extends.apply(this, arguments);
}
@@ -13978,17 +13980,16 @@ return Popper;
}
function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
-
return _setPrototypeOf(o, p);
}
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.1): util.js
+ * Bootstrap (v4.6.2): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -14162,7 +14163,7 @@ return Popper;
*/
var NAME$a = 'alert';
- var VERSION$a = '4.6.1';
+ var VERSION$a = '4.6.2';
var DATA_KEY$a = 'bs.alert';
var EVENT_KEY$a = "." + DATA_KEY$a;
var DATA_API_KEY$7 = '.data-api';
@@ -14310,7 +14311,7 @@ return Popper;
*/
var NAME$9 = 'button';
- var VERSION$9 = '4.6.1';
+ var VERSION$9 = '4.6.2';
var DATA_KEY$9 = 'bs.button';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$6 = '.data-api';
@@ -14501,7 +14502,7 @@ return Popper;
*/
var NAME$8 = 'carousel';
- var VERSION$8 = '4.6.1';
+ var VERSION$8 = '4.6.2';
var DATA_KEY$8 = 'bs.carousel';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$5 = '.data-api';
@@ -15088,7 +15089,7 @@ return Popper;
*/
var NAME$7 = 'collapse';
- var VERSION$7 = '4.6.1';
+ var VERSION$7 = '4.6.2';
var DATA_KEY$7 = 'bs.collapse';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var DATA_API_KEY$4 = '.data-api';
@@ -15429,7 +15430,7 @@ return Popper;
*/
var NAME$6 = 'dropdown';
- var VERSION$6 = '4.6.1';
+ var VERSION$6 = '4.6.2';
var DATA_KEY$6 = 'bs.dropdown';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var DATA_API_KEY$3 = '.data-api';
@@ -15932,7 +15933,7 @@ return Popper;
*/
var NAME$5 = 'modal';
- var VERSION$5 = '4.6.1';
+ var VERSION$5 = '4.6.2';
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$2 = '.data-api';
@@ -16536,7 +16537,7 @@ return Popper;
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.1): tools/sanitizer.js
+ * Bootstrap (v4.6.2): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16661,7 +16662,7 @@ return Popper;
*/
var NAME$4 = 'tooltip';
- var VERSION$4 = '4.6.1';
+ var VERSION$4 = '4.6.2';
var DATA_KEY$4 = 'bs.tooltip';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4];
@@ -17371,7 +17372,7 @@ return Popper;
*/
var NAME$3 = 'popover';
- var VERSION$3 = '4.6.1';
+ var VERSION$3 = '4.6.2';
var DATA_KEY$3 = 'bs.popover';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3];
@@ -17545,7 +17546,7 @@ return Popper;
*/
var NAME$2 = 'scrollspy';
- var VERSION$2 = '4.6.1';
+ var VERSION$2 = '4.6.2';
var DATA_KEY$2 = 'bs.scrollspy';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$1 = '.data-api';
@@ -17631,9 +17632,7 @@ return Popper;
}
return null;
- }).filter(function (item) {
- return item;
- }).sort(function (a, b) {
+ }).filter(Boolean).sort(function (a, b) {
return a[0] - b[0];
}).forEach(function (item) {
_this2._offsets.push(item[0]);
@@ -17829,7 +17828,7 @@ return Popper;
*/
var NAME$1 = 'tab';
- var VERSION$1 = '4.6.1';
+ var VERSION$1 = '4.6.2';
var DATA_KEY$1 = 'bs.tab';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY = '.data-api';
@@ -17867,7 +17866,7 @@ return Popper;
_proto.show = function show() {
var _this = this;
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED)) {
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || this._element.hasAttribute('disabled')) {
return;
}
@@ -18053,7 +18052,7 @@ return Popper;
*/
var NAME = 'toast';
- var VERSION = '4.6.1';
+ var VERSION = '4.6.2';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
diff --git a/static/babybuddy/js/vendor.js.gz b/static/babybuddy/js/vendor.js.gz
index a05569e6..ca48d05a 100644
Binary files a/static/babybuddy/js/vendor.js.gz and b/static/babybuddy/js/vendor.js.gz differ
diff --git a/static/staticfiles.json b/static/staticfiles.json
index 08b1f1bb..bc026af8 100644
--- a/static/staticfiles.json
+++ b/static/staticfiles.json
@@ -1 +1 @@
-{"paths": {"admin/js/vendor/select2/i18n/km.js": "admin/js/vendor/select2/i18n/km.c23089cb06ca.js", "admin/js/vendor/select2/i18n/ro.js": "admin/js/vendor/select2/i18n/ro.f75cb460ec3b.js", "admin/js/vendor/select2/i18n/vi.js": "admin/js/vendor/select2/i18n/vi.097a5b75b3e1.js", "admin/js/vendor/select2/i18n/lv.js": "admin/js/vendor/select2/i18n/lv.08e62128eac1.js", "admin/js/vendor/select2/i18n/fr.js": "admin/js/vendor/select2/i18n/fr.05e0542fcfe6.js", "admin/js/vendor/select2/i18n/de.js": "admin/js/vendor/select2/i18n/de.8a1c222b0204.js", "admin/js/vendor/select2/i18n/bs.js": "admin/js/vendor/select2/i18n/bs.91624382358e.js", "admin/js/vendor/select2/i18n/ms.js": "admin/js/vendor/select2/i18n/ms.4ba82c9a51ce.js", "admin/js/vendor/select2/i18n/sq.js": "admin/js/vendor/select2/i18n/sq.5636b60d29c9.js", "admin/js/vendor/select2/i18n/tr.js": "admin/js/vendor/select2/i18n/tr.b5a0643d1545.js", "admin/js/vendor/select2/i18n/en.js": "admin/js/vendor/select2/i18n/en.cf932ba09a98.js", "admin/js/vendor/select2/i18n/it.js": "admin/js/vendor/select2/i18n/it.be4fe8d365b5.js", "admin/js/vendor/select2/i18n/fi.js": "admin/js/vendor/select2/i18n/fi.614ec42aa9ba.js", "admin/js/vendor/select2/i18n/nb.js": "admin/js/vendor/select2/i18n/nb.da2fce143f27.js", "admin/js/vendor/select2/i18n/eu.js": "admin/js/vendor/select2/i18n/eu.adfe5c97b72c.js", "admin/js/vendor/select2/i18n/bg.js": "admin/js/vendor/select2/i18n/bg.39b8be30d4f0.js", "admin/js/vendor/select2/i18n/ar.js": "admin/js/vendor/select2/i18n/ar.65aa8e36bf5d.js", "admin/js/vendor/select2/i18n/et.js": "admin/js/vendor/select2/i18n/et.2b96fd98289d.js", "admin/js/vendor/select2/i18n/cs.js": "admin/js/vendor/select2/i18n/cs.4f43e8e7d33a.js", "admin/js/vendor/select2/i18n/af.js": "admin/js/vendor/select2/i18n/af.4f6fcd73488c.js", "admin/js/vendor/select2/i18n/el.js": "admin/js/vendor/select2/i18n/el.27097f071856.js", "admin/js/vendor/select2/i18n/hsb.js": "admin/js/vendor/select2/i18n/hsb.fa3b55265efe.js", "admin/js/vendor/select2/i18n/ca.js": "admin/js/vendor/select2/i18n/ca.a166b745933a.js", "admin/js/vendor/select2/i18n/nl.js": "admin/js/vendor/select2/i18n/nl.997868a37ed8.js", "admin/js/vendor/select2/i18n/zh-CN.js": "admin/js/vendor/select2/i18n/zh-CN.2cff662ec5f9.js", "admin/js/vendor/select2/i18n/ps.js": "admin/js/vendor/select2/i18n/ps.38dfa47af9e0.js", "admin/js/vendor/select2/i18n/ko.js": "admin/js/vendor/select2/i18n/ko.e7be6c20e673.js", "admin/js/vendor/select2/i18n/hr.js": "admin/js/vendor/select2/i18n/hr.a2b092cc1147.js", "admin/js/vendor/select2/i18n/zh-TW.js": "admin/js/vendor/select2/i18n/zh-TW.04554a227c2b.js", "admin/js/vendor/select2/i18n/fa.js": "admin/js/vendor/select2/i18n/fa.3b5bd1961cfd.js", "admin/js/vendor/select2/i18n/dsb.js": "admin/js/vendor/select2/i18n/dsb.56372c92d2f1.js", "admin/js/vendor/select2/i18n/ne.js": "admin/js/vendor/select2/i18n/ne.3d79fd3f08db.js", "admin/js/vendor/select2/i18n/id.js": "admin/js/vendor/select2/i18n/id.04debded514d.js", "admin/js/vendor/select2/i18n/sk.js": "admin/js/vendor/select2/i18n/sk.33d02cef8d11.js", "admin/js/vendor/select2/i18n/tk.js": "admin/js/vendor/select2/i18n/tk.7c572a68c78f.js", "admin/js/vendor/select2/i18n/th.js": "admin/js/vendor/select2/i18n/th.f38c20b0221b.js", "admin/js/vendor/select2/i18n/is.js": "admin/js/vendor/select2/i18n/is.3ddd9a6a97e9.js", "admin/js/vendor/select2/i18n/ka.js": "admin/js/vendor/select2/i18n/ka.2083264a54f0.js", "admin/js/vendor/select2/i18n/bn.js": "admin/js/vendor/select2/i18n/bn.6d42b4dd5665.js", "admin/js/vendor/select2/i18n/pt.js": "admin/js/vendor/select2/i18n/pt.33b4a3b44d43.js", "admin/js/vendor/select2/i18n/pl.js": "admin/js/vendor/select2/i18n/pl.6031b4f16452.js", "admin/js/vendor/select2/i18n/hu.js": "admin/js/vendor/select2/i18n/hu.6ec6039cb8a3.js", "admin/js/vendor/select2/i18n/sr.js": "admin/js/vendor/select2/i18n/sr.5ed85a48f483.js", "admin/js/vendor/select2/i18n/pt-BR.js": "admin/js/vendor/select2/i18n/pt-BR.e1b294433e7f.js", "admin/js/vendor/select2/i18n/sr-Cyrl.js": "admin/js/vendor/select2/i18n/sr-Cyrl.f254bb8c4c7c.js", "admin/js/vendor/select2/i18n/lt.js": "admin/js/vendor/select2/i18n/lt.23c7ce903300.js", "admin/js/vendor/select2/i18n/sl.js": "admin/js/vendor/select2/i18n/sl.131a78bc0752.js", "admin/js/vendor/select2/i18n/he.js": "admin/js/vendor/select2/i18n/he.e420ff6cd3ed.js", "admin/js/vendor/select2/i18n/da.js": "admin/js/vendor/select2/i18n/da.766346afe4dd.js", "admin/js/vendor/select2/i18n/hi.js": "admin/js/vendor/select2/i18n/hi.70640d41628f.js", "admin/js/vendor/select2/i18n/az.js": "admin/js/vendor/select2/i18n/az.270c257daf81.js", "admin/js/vendor/select2/i18n/mk.js": "admin/js/vendor/select2/i18n/mk.dabbb9087130.js", "admin/js/vendor/select2/i18n/hy.js": "admin/js/vendor/select2/i18n/hy.c7babaeef5a6.js", "admin/js/vendor/select2/i18n/gl.js": "admin/js/vendor/select2/i18n/gl.d99b1fedaa86.js", "admin/js/vendor/select2/i18n/ru.js": "admin/js/vendor/select2/i18n/ru.934aa95f5b5f.js", "admin/js/vendor/select2/i18n/es.js": "admin/js/vendor/select2/i18n/es.66dbc2652fb1.js", "admin/js/vendor/select2/i18n/uk.js": "admin/js/vendor/select2/i18n/uk.8cede7f4803c.js", "admin/js/vendor/select2/i18n/sv.js": "admin/js/vendor/select2/i18n/sv.7a9c2f71e777.js", "admin/js/vendor/select2/i18n/ja.js": "admin/js/vendor/select2/i18n/ja.170ae885d74f.js", "admin/js/vendor/select2/LICENSE.md": "admin/js/vendor/select2/LICENSE.f94142512c91.md", "admin/js/vendor/select2/select2.full.js": "admin/js/vendor/select2/select2.full.c2afdeda3058.js", "admin/js/vendor/select2/select2.full.min.js": "admin/js/vendor/select2/select2.full.min.fcd7500d8e13.js", "admin/js/vendor/xregexp/xregexp.min.js": "admin/js/vendor/xregexp/xregexp.min.b0439563a5d3.js", "admin/js/vendor/xregexp/LICENSE.txt": "admin/js/vendor/xregexp/LICENSE.bf79e414957a.txt", "admin/js/vendor/xregexp/xregexp.js": "admin/js/vendor/xregexp/xregexp.efda034b9537.js", "admin/js/vendor/jquery/jquery.js": "admin/js/vendor/jquery/jquery.2849239b95f5.js", "admin/js/vendor/jquery/jquery.min.js": "admin/js/vendor/jquery/jquery.min.8fb8fee4fcc3.js", "admin/js/vendor/jquery/LICENSE.txt": "admin/js/vendor/jquery/LICENSE.de877aa6d744.txt", "admin/css/vendor/select2/select2.min.css": "admin/css/vendor/select2/select2.min.9f54e6414f87.css", "admin/css/vendor/select2/select2.css": "admin/css/vendor/select2/select2.a2194c262648.css", "admin/css/vendor/select2/LICENSE-SELECT2.md": "admin/css/vendor/select2/LICENSE-SELECT2.f94142512c91.md", "babybuddy/img/core/child-placeholder.png": "babybuddy/img/core/child-placeholder.7c0a81f0d7f0.png", "rest_framework/docs/js/jquery.json-view.min.js": "rest_framework/docs/js/jquery.json-view.min.b7c2d6981377.js", "rest_framework/docs/js/api.js": "rest_framework/docs/js/api.c9743eab7a4f.js", "rest_framework/docs/js/highlight.pack.js": "rest_framework/docs/js/highlight.pack.479b5f21dcba.js", "rest_framework/docs/img/grid.png": "rest_framework/docs/img/grid.a4b938cf382b.png", "rest_framework/docs/img/favicon.ico": "rest_framework/docs/img/favicon.5195b4d0f3eb.ico", "rest_framework/docs/css/jquery.json-view.min.css": "rest_framework/docs/css/jquery.json-view.min.a2e6beeb6710.css", "rest_framework/docs/css/base.css": "rest_framework/docs/css/base.e630f8f4990e.css", "rest_framework/docs/css/highlight.css": "rest_framework/docs/css/highlight.e0e4d973c6d7.css", "admin/js/admin/DateTimeShortcuts.js": "admin/js/admin/DateTimeShortcuts.5548f99471bf.js", "admin/js/admin/RelatedObjectLookups.js": "admin/js/admin/RelatedObjectLookups.b4d76b6aaf0b.js", "admin/img/gis/move_vertex_off.svg": "admin/img/gis/move_vertex_off.7a23bf31ef8a.svg", "admin/img/gis/move_vertex_on.svg": "admin/img/gis/move_vertex_on.0047eba25b67.svg", "babybuddy/root/mstile-150x150.png": "babybuddy/root/mstile-150x150.08524a406cf2.png", "babybuddy/root/apple-touch-icon.png": "babybuddy/root/apple-touch-icon.bdc75cec89fa.png", "babybuddy/root/site.webmanifest": "babybuddy/root/site.c6c4158e40df.webmanifest", "babybuddy/root/android-chrome-512x512.png": "babybuddy/root/android-chrome-512x512.e1fd38ad828c.png", "babybuddy/root/apple-touch-startup-image.png": "babybuddy/root/apple-touch-startup-image.749726217484.png", "babybuddy/root/android-chrome-192x192.png": "babybuddy/root/android-chrome-192x192.ac7d2baba4df.png", "babybuddy/root/browserconfig.xml": "babybuddy/root/browserconfig.84708aade0e5.xml", "babybuddy/root/favicon.ico": "babybuddy/root/favicon.ee5ebcd40fb9.ico", "babybuddy/root/favicon.svg": "babybuddy/root/favicon.12fe726d0bac.svg", "babybuddy/root/safari-pinned-tab.svg": "babybuddy/root/safari-pinned-tab.e8c8ac2f55f5.svg", "babybuddy/js/vendor.js": "babybuddy/js/vendor.c2389e01b831.js", "babybuddy/js/graph.js": "babybuddy/js/graph.81d7e15ea5a8.js", "babybuddy/js/app.js": "babybuddy/js/app.1eb586ba082f.js", "babybuddy/js/tags_editor.js": "babybuddy/js/tags_editor.6fc8d69c680c.js", "babybuddy/css/app.css": "babybuddy/css/app.06e5b947338f.css", "babybuddy/font/babybuddy.woff2": "babybuddy/font/babybuddy.998e9bc52faf.woff2", "babybuddy/font/babybuddy.eot": "babybuddy/font/babybuddy.ae7049e685dd.eot", "babybuddy/font/babybuddy.woff": "babybuddy/font/babybuddy.1913791605fb.woff", "babybuddy/font/babybuddy.svg": "babybuddy/font/babybuddy.ef799e0dd5c7.svg", "babybuddy/font/babybuddy.ttf": "babybuddy/font/babybuddy.b6a356bd9752.ttf", "babybuddy/logo/icon-brand.png": "babybuddy/logo/icon-brand.32cbedf6aee3.png", "babybuddy/logo/logo.png": "babybuddy/logo/logo.62870041cc83.png", "babybuddy/logo/logo-sad.png": "babybuddy/logo/logo-sad.47c3d5c2d397.png", "babybuddy/logo/icon.png": "babybuddy/logo/icon.df80640f0465.png", "rest_framework/js/prettify-min.js": "rest_framework/js/prettify-min.709bfcc456c6.js", "rest_framework/js/jquery-3.5.1.min.js": "rest_framework/js/jquery-3.5.1.min.dc5e7f18c8d3.js", "rest_framework/js/default.js": "rest_framework/js/default.5b08897dbdc3.js", "rest_framework/js/csrf.js": "rest_framework/js/csrf.969930007329.js", "rest_framework/js/ajax-form.js": "rest_framework/js/ajax-form.0ea6e6052ab5.js", "rest_framework/js/bootstrap.min.js": "rest_framework/js/bootstrap.min.2f34b630ffe3.js", "rest_framework/js/coreapi-0.1.1.js": "rest_framework/js/coreapi-0.1.1.e580e3854595.js", "rest_framework/fonts/fontawesome-webfont.svg": "rest_framework/fonts/fontawesome-webfont.83e37a11f9d7.svg", "rest_framework/fonts/fontawesome-webfont.eot": "rest_framework/fonts/fontawesome-webfont.8b27bc96115c.eot", "rest_framework/fonts/glyphicons-halflings-regular.ttf": "rest_framework/fonts/glyphicons-halflings-regular.e18bbf611f2a.ttf", "rest_framework/fonts/glyphicons-halflings-regular.svg": "rest_framework/fonts/glyphicons-halflings-regular.08eda92397ae.svg", "rest_framework/fonts/fontawesome-webfont.ttf": "rest_framework/fonts/fontawesome-webfont.dcb26c7239d8.ttf", "rest_framework/fonts/glyphicons-halflings-regular.eot": "rest_framework/fonts/glyphicons-halflings-regular.f4769f9bdb74.eot", "rest_framework/fonts/glyphicons-halflings-regular.woff": "rest_framework/fonts/glyphicons-halflings-regular.fa2772327f55.woff", "rest_framework/fonts/glyphicons-halflings-regular.woff2": "rest_framework/fonts/glyphicons-halflings-regular.448c34a56d69.woff2", "rest_framework/fonts/fontawesome-webfont.woff": "rest_framework/fonts/fontawesome-webfont.3293616ec0c6.woff", "rest_framework/img/glyphicons-halflings.png": "rest_framework/img/glyphicons-halflings.90233c9067e9.png", "rest_framework/img/glyphicons-halflings-white.png": "rest_framework/img/glyphicons-halflings-white.9bbc6e960299.png", "rest_framework/img/grid.png": "rest_framework/img/grid.a4b938cf382b.png", "rest_framework/css/prettify.css": "rest_framework/css/prettify.a987f72342ee.css", "rest_framework/css/bootstrap.min.css": "rest_framework/css/bootstrap.min.77017a69879a.css", "rest_framework/css/font-awesome-4.0.3.css": "rest_framework/css/font-awesome-4.0.3.c1e1ea213abf.css", "rest_framework/css/default.css": "rest_framework/css/default.789dfb5732d7.css", "rest_framework/css/bootstrap-theme.min.css": "rest_framework/css/bootstrap-theme.min.66b84a04375e.css", "rest_framework/css/bootstrap-tweaks.css": "rest_framework/css/bootstrap-tweaks.46ed116b0edd.css", "admin/js/prepopulate_init.js": "admin/js/prepopulate_init.e056047b7a7e.js", "admin/js/autocomplete.js": "admin/js/autocomplete.c508b167ab61.js", "admin/js/urlify.js": "admin/js/urlify.25cc3eac8123.js", "admin/js/actions.js": "admin/js/actions.eac7e3441574.js", "admin/js/cancel.js": "admin/js/cancel.ecc4c5ca7b32.js", "admin/js/core.js": "admin/js/core.5d6b384a08b5.js", "admin/js/popup_response.js": "admin/js/popup_response.c6cc78ea5551.js", "admin/js/collapse.js": "admin/js/collapse.f84e7410290f.js", "admin/js/calendar.js": "admin/js/calendar.f8a5d055eb33.js", "admin/js/change_form.js": "admin/js/change_form.9d8ca4f96b75.js", "admin/js/jquery.init.js": "admin/js/jquery.init.b7781a0897fc.js", "admin/js/nav_sidebar.js": "admin/js/nav_sidebar.36a64ecb39ed.js", "admin/js/SelectFilter2.js": "admin/js/SelectFilter2.d250dcb52a9a.js", "admin/js/SelectBox.js": "admin/js/SelectBox.8161741c7647.js", "admin/js/inlines.js": "admin/js/inlines.fb1617228dbe.js", "admin/js/prepopulate.js": "admin/js/prepopulate.bd2361dfd64d.js", "admin/fonts/README.txt": "admin/fonts/README.ab99e6b541ea.txt", "admin/fonts/Roboto-Regular-webfont.woff": "admin/fonts/Roboto-Regular-webfont.35b07eb2f871.woff", "admin/fonts/Roboto-Bold-webfont.woff": "admin/fonts/Roboto-Bold-webfont.50d75e48e0a3.woff", "admin/fonts/Roboto-Light-webfont.woff": "admin/fonts/Roboto-Light-webfont.c73eb1ceba33.woff", "admin/fonts/LICENSE.txt": "admin/fonts/LICENSE.d273d63619c9.txt", "admin/img/README.txt": "admin/img/README.a70711a38d87.txt", "admin/img/sorting-icons.svg": "admin/img/sorting-icons.3a097b59f104.svg", "admin/img/selector-icons.svg": "admin/img/selector-icons.b4555096cea2.svg", "admin/img/icon-deletelink.svg": "admin/img/icon-deletelink.564ef9dc3854.svg", "admin/img/icon-no.svg": "admin/img/icon-no.439e821418cd.svg", "admin/img/icon-viewlink.svg": "admin/img/icon-viewlink.41eb31f7826e.svg", "admin/img/icon-clock.svg": "admin/img/icon-clock.e1d4dfac3f2b.svg", "admin/img/tooltag-add.svg": "admin/img/tooltag-add.e59d620a9742.svg", "admin/img/icon-changelink.svg": "admin/img/icon-changelink.18d2fd706348.svg", "admin/img/icon-addlink.svg": "admin/img/icon-addlink.d519b3bab011.svg", "admin/img/icon-unknown-alt.svg": "admin/img/icon-unknown-alt.81536e128bb6.svg", "admin/img/LICENSE": "admin/img/LICENSE.2c54f4e1ca1c", "admin/img/icon-alert.svg": "admin/img/icon-alert.034cc7d8a67f.svg", "admin/img/icon-yes.svg": "admin/img/icon-yes.d2f9f035226a.svg", "admin/img/tooltag-arrowright.svg": "admin/img/tooltag-arrowright.bbfb788a849e.svg", "admin/img/icon-unknown.svg": "admin/img/icon-unknown.a18cb4398978.svg", "admin/img/calendar-icons.svg": "admin/img/calendar-icons.39b290681a8b.svg", "admin/img/icon-calendar.svg": "admin/img/icon-calendar.ac7aea671bea.svg", "admin/img/search.svg": "admin/img/search.7cf54ff789c6.svg", "admin/img/inline-delete.svg": "admin/img/inline-delete.fec1b761f254.svg", "admin/css/responsive.css": "admin/css/responsive.b9e1565b3609.css", "admin/css/login.css": "admin/css/login.8b76a9f7cbf6.css", "admin/css/fonts.css": "admin/css/fonts.168bab448fee.css", "admin/css/widgets.css": "admin/css/widgets.694d845b2cb1.css", "admin/css/autocomplete.css": "admin/css/autocomplete.4a81fc4242d0.css", "admin/css/rtl.css": "admin/css/rtl.4bc23eb90919.css", "admin/css/dashboard.css": "admin/css/dashboard.be83f13e4369.css", "admin/css/changelists.css": "admin/css/changelists.cd4dd90ae1a1.css", "admin/css/nav_sidebar.css": "admin/css/nav_sidebar.e32d345464bd.css", "admin/css/responsive_rtl.css": "admin/css/responsive_rtl.e13ae754cceb.css", "admin/css/forms.css": "admin/css/forms.332ab41432e2.css", "admin/css/base.css": "admin/css/base.1f418065fc2c.css", "import_export/import.css": "import_export/import.87299a479910.css", "import_export/action_formats.js": "import_export/action_formats.11c3e817b80a.js"}, "version": "1.0"}
\ No newline at end of file
+{"paths": {"admin/js/vendor/select2/i18n/pt.js": "admin/js/vendor/select2/i18n/pt.33b4a3b44d43.js", "admin/js/vendor/select2/i18n/hsb.js": "admin/js/vendor/select2/i18n/hsb.fa3b55265efe.js", "admin/js/vendor/select2/i18n/vi.js": "admin/js/vendor/select2/i18n/vi.097a5b75b3e1.js", "admin/js/vendor/select2/i18n/lv.js": "admin/js/vendor/select2/i18n/lv.08e62128eac1.js", "admin/js/vendor/select2/i18n/gl.js": "admin/js/vendor/select2/i18n/gl.d99b1fedaa86.js", "admin/js/vendor/select2/i18n/pl.js": "admin/js/vendor/select2/i18n/pl.6031b4f16452.js", "admin/js/vendor/select2/i18n/el.js": "admin/js/vendor/select2/i18n/el.27097f071856.js", "admin/js/vendor/select2/i18n/dsb.js": "admin/js/vendor/select2/i18n/dsb.56372c92d2f1.js", "admin/js/vendor/select2/i18n/et.js": "admin/js/vendor/select2/i18n/et.2b96fd98289d.js", "admin/js/vendor/select2/i18n/is.js": "admin/js/vendor/select2/i18n/is.3ddd9a6a97e9.js", "admin/js/vendor/select2/i18n/sl.js": "admin/js/vendor/select2/i18n/sl.131a78bc0752.js", "admin/js/vendor/select2/i18n/ko.js": "admin/js/vendor/select2/i18n/ko.e7be6c20e673.js", "admin/js/vendor/select2/i18n/hr.js": "admin/js/vendor/select2/i18n/hr.a2b092cc1147.js", "admin/js/vendor/select2/i18n/ms.js": "admin/js/vendor/select2/i18n/ms.4ba82c9a51ce.js", "admin/js/vendor/select2/i18n/fi.js": "admin/js/vendor/select2/i18n/fi.614ec42aa9ba.js", "admin/js/vendor/select2/i18n/th.js": "admin/js/vendor/select2/i18n/th.f38c20b0221b.js", "admin/js/vendor/select2/i18n/ru.js": "admin/js/vendor/select2/i18n/ru.934aa95f5b5f.js", "admin/js/vendor/select2/i18n/eu.js": "admin/js/vendor/select2/i18n/eu.adfe5c97b72c.js", "admin/js/vendor/select2/i18n/mk.js": "admin/js/vendor/select2/i18n/mk.dabbb9087130.js", "admin/js/vendor/select2/i18n/sq.js": "admin/js/vendor/select2/i18n/sq.5636b60d29c9.js", "admin/js/vendor/select2/i18n/ja.js": "admin/js/vendor/select2/i18n/ja.170ae885d74f.js", "admin/js/vendor/select2/i18n/ka.js": "admin/js/vendor/select2/i18n/ka.2083264a54f0.js", "admin/js/vendor/select2/i18n/he.js": "admin/js/vendor/select2/i18n/he.e420ff6cd3ed.js", "admin/js/vendor/select2/i18n/bg.js": "admin/js/vendor/select2/i18n/bg.39b8be30d4f0.js", "admin/js/vendor/select2/i18n/hy.js": "admin/js/vendor/select2/i18n/hy.c7babaeef5a6.js", "admin/js/vendor/select2/i18n/sr-Cyrl.js": "admin/js/vendor/select2/i18n/sr-Cyrl.f254bb8c4c7c.js", "admin/js/vendor/select2/i18n/ne.js": "admin/js/vendor/select2/i18n/ne.3d79fd3f08db.js", "admin/js/vendor/select2/i18n/af.js": "admin/js/vendor/select2/i18n/af.4f6fcd73488c.js", "admin/js/vendor/select2/i18n/id.js": "admin/js/vendor/select2/i18n/id.04debded514d.js", "admin/js/vendor/select2/i18n/az.js": "admin/js/vendor/select2/i18n/az.270c257daf81.js", "admin/js/vendor/select2/i18n/ca.js": "admin/js/vendor/select2/i18n/ca.a166b745933a.js", "admin/js/vendor/select2/i18n/nb.js": "admin/js/vendor/select2/i18n/nb.da2fce143f27.js", "admin/js/vendor/select2/i18n/zh-CN.js": "admin/js/vendor/select2/i18n/zh-CN.2cff662ec5f9.js", "admin/js/vendor/select2/i18n/zh-TW.js": "admin/js/vendor/select2/i18n/zh-TW.04554a227c2b.js", "admin/js/vendor/select2/i18n/pt-BR.js": "admin/js/vendor/select2/i18n/pt-BR.e1b294433e7f.js", "admin/js/vendor/select2/i18n/da.js": "admin/js/vendor/select2/i18n/da.766346afe4dd.js", "admin/js/vendor/select2/i18n/fa.js": "admin/js/vendor/select2/i18n/fa.3b5bd1961cfd.js", "admin/js/vendor/select2/i18n/de.js": "admin/js/vendor/select2/i18n/de.8a1c222b0204.js", "admin/js/vendor/select2/i18n/en.js": "admin/js/vendor/select2/i18n/en.cf932ba09a98.js", "admin/js/vendor/select2/i18n/bs.js": "admin/js/vendor/select2/i18n/bs.91624382358e.js", "admin/js/vendor/select2/i18n/tk.js": "admin/js/vendor/select2/i18n/tk.7c572a68c78f.js", "admin/js/vendor/select2/i18n/sv.js": "admin/js/vendor/select2/i18n/sv.7a9c2f71e777.js", "admin/js/vendor/select2/i18n/hi.js": "admin/js/vendor/select2/i18n/hi.70640d41628f.js", "admin/js/vendor/select2/i18n/uk.js": "admin/js/vendor/select2/i18n/uk.8cede7f4803c.js", "admin/js/vendor/select2/i18n/cs.js": "admin/js/vendor/select2/i18n/cs.4f43e8e7d33a.js", "admin/js/vendor/select2/i18n/km.js": "admin/js/vendor/select2/i18n/km.c23089cb06ca.js", "admin/js/vendor/select2/i18n/fr.js": "admin/js/vendor/select2/i18n/fr.05e0542fcfe6.js", "admin/js/vendor/select2/i18n/nl.js": "admin/js/vendor/select2/i18n/nl.997868a37ed8.js", "admin/js/vendor/select2/i18n/sr.js": "admin/js/vendor/select2/i18n/sr.5ed85a48f483.js", "admin/js/vendor/select2/i18n/hu.js": "admin/js/vendor/select2/i18n/hu.6ec6039cb8a3.js", "admin/js/vendor/select2/i18n/lt.js": "admin/js/vendor/select2/i18n/lt.23c7ce903300.js", "admin/js/vendor/select2/i18n/ar.js": "admin/js/vendor/select2/i18n/ar.65aa8e36bf5d.js", "admin/js/vendor/select2/i18n/sk.js": "admin/js/vendor/select2/i18n/sk.33d02cef8d11.js", "admin/js/vendor/select2/i18n/it.js": "admin/js/vendor/select2/i18n/it.be4fe8d365b5.js", "admin/js/vendor/select2/i18n/es.js": "admin/js/vendor/select2/i18n/es.66dbc2652fb1.js", "admin/js/vendor/select2/i18n/bn.js": "admin/js/vendor/select2/i18n/bn.6d42b4dd5665.js", "admin/js/vendor/select2/i18n/ro.js": "admin/js/vendor/select2/i18n/ro.f75cb460ec3b.js", "admin/js/vendor/select2/i18n/ps.js": "admin/js/vendor/select2/i18n/ps.38dfa47af9e0.js", "admin/js/vendor/select2/i18n/tr.js": "admin/js/vendor/select2/i18n/tr.b5a0643d1545.js", "admin/css/vendor/select2/select2.min.css": "admin/css/vendor/select2/select2.min.9f54e6414f87.css", "admin/css/vendor/select2/LICENSE-SELECT2.md": "admin/css/vendor/select2/LICENSE-SELECT2.f94142512c91.md", "admin/css/vendor/select2/select2.css": "admin/css/vendor/select2/select2.a2194c262648.css", "admin/js/vendor/jquery/jquery.min.js": "admin/js/vendor/jquery/jquery.min.8fb8fee4fcc3.js", "admin/js/vendor/jquery/LICENSE.txt": "admin/js/vendor/jquery/LICENSE.de877aa6d744.txt", "admin/js/vendor/jquery/jquery.js": "admin/js/vendor/jquery/jquery.2849239b95f5.js", "admin/js/vendor/xregexp/xregexp.min.js": "admin/js/vendor/xregexp/xregexp.min.b0439563a5d3.js", "admin/js/vendor/xregexp/xregexp.js": "admin/js/vendor/xregexp/xregexp.efda034b9537.js", "admin/js/vendor/xregexp/LICENSE.txt": "admin/js/vendor/xregexp/LICENSE.bf79e414957a.txt", "admin/js/vendor/select2/LICENSE.md": "admin/js/vendor/select2/LICENSE.f94142512c91.md", "admin/js/vendor/select2/select2.full.min.js": "admin/js/vendor/select2/select2.full.min.fcd7500d8e13.js", "admin/js/vendor/select2/select2.full.js": "admin/js/vendor/select2/select2.full.c2afdeda3058.js", "babybuddy/img/core/child-placeholder.png": "babybuddy/img/core/child-placeholder.7c0a81f0d7f0.png", "rest_framework/docs/css/highlight.css": "rest_framework/docs/css/highlight.e0e4d973c6d7.css", "rest_framework/docs/css/base.css": "rest_framework/docs/css/base.e630f8f4990e.css", "rest_framework/docs/css/jquery.json-view.min.css": "rest_framework/docs/css/jquery.json-view.min.a2e6beeb6710.css", "rest_framework/docs/js/highlight.pack.js": "rest_framework/docs/js/highlight.pack.479b5f21dcba.js", "rest_framework/docs/js/api.js": "rest_framework/docs/js/api.c9743eab7a4f.js", "rest_framework/docs/js/jquery.json-view.min.js": "rest_framework/docs/js/jquery.json-view.min.b7c2d6981377.js", "rest_framework/docs/img/favicon.ico": "rest_framework/docs/img/favicon.5195b4d0f3eb.ico", "rest_framework/docs/img/grid.png": "rest_framework/docs/img/grid.a4b938cf382b.png", "admin/js/admin/RelatedObjectLookups.js": "admin/js/admin/RelatedObjectLookups.b4d76b6aaf0b.js", "admin/js/admin/DateTimeShortcuts.js": "admin/js/admin/DateTimeShortcuts.5548f99471bf.js", "admin/img/gis/move_vertex_on.svg": "admin/img/gis/move_vertex_on.0047eba25b67.svg", "admin/img/gis/move_vertex_off.svg": "admin/img/gis/move_vertex_off.7a23bf31ef8a.svg", "babybuddy/css/app.css": "babybuddy/css/app.f8b494589646.css", "babybuddy/js/graph.js": "babybuddy/js/graph.770f14765845.js", "babybuddy/js/vendor.js": "babybuddy/js/vendor.6f561e43be7c.js", "babybuddy/js/tags_editor.js": "babybuddy/js/tags_editor.6fc8d69c680c.js", "babybuddy/js/app.js": "babybuddy/js/app.1eb586ba082f.js", "babybuddy/logo/icon.png": "babybuddy/logo/icon.df80640f0465.png", "babybuddy/logo/icon-brand.png": "babybuddy/logo/icon-brand.32cbedf6aee3.png", "babybuddy/logo/logo-sad.png": "babybuddy/logo/logo-sad.47c3d5c2d397.png", "babybuddy/logo/logo.png": "babybuddy/logo/logo.62870041cc83.png", "babybuddy/root/safari-pinned-tab.svg": "babybuddy/root/safari-pinned-tab.e8c8ac2f55f5.svg", "babybuddy/root/favicon.ico": "babybuddy/root/favicon.ee5ebcd40fb9.ico", "babybuddy/root/android-chrome-192x192.png": "babybuddy/root/android-chrome-192x192.ac7d2baba4df.png", "babybuddy/root/apple-touch-icon.png": "babybuddy/root/apple-touch-icon.bdc75cec89fa.png", "babybuddy/root/android-chrome-512x512.png": "babybuddy/root/android-chrome-512x512.e1fd38ad828c.png", "babybuddy/root/site.webmanifest": "babybuddy/root/site.c6c4158e40df.webmanifest", "babybuddy/root/mstile-150x150.png": "babybuddy/root/mstile-150x150.08524a406cf2.png", "babybuddy/root/browserconfig.xml": "babybuddy/root/browserconfig.84708aade0e5.xml", "babybuddy/root/apple-touch-startup-image.png": "babybuddy/root/apple-touch-startup-image.749726217484.png", "babybuddy/root/favicon.svg": "babybuddy/root/favicon.12fe726d0bac.svg", "babybuddy/font/babybuddy.svg": "babybuddy/font/babybuddy.ef799e0dd5c7.svg", "babybuddy/font/babybuddy.woff": "babybuddy/font/babybuddy.1913791605fb.woff", "babybuddy/font/babybuddy.woff2": "babybuddy/font/babybuddy.998e9bc52faf.woff2", "babybuddy/font/babybuddy.ttf": "babybuddy/font/babybuddy.b6a356bd9752.ttf", "babybuddy/font/babybuddy.eot": "babybuddy/font/babybuddy.ae7049e685dd.eot", "rest_framework/css/bootstrap.min.css": "rest_framework/css/bootstrap.min.77017a69879a.css", "rest_framework/css/prettify.css": "rest_framework/css/prettify.a987f72342ee.css", "rest_framework/css/default.css": "rest_framework/css/default.789dfb5732d7.css", "rest_framework/css/font-awesome-4.0.3.css": "rest_framework/css/font-awesome-4.0.3.c1e1ea213abf.css", "rest_framework/css/bootstrap-tweaks.css": "rest_framework/css/bootstrap-tweaks.46ed116b0edd.css", "rest_framework/css/bootstrap-theme.min.css": "rest_framework/css/bootstrap-theme.min.66b84a04375e.css", "rest_framework/js/ajax-form.js": "rest_framework/js/ajax-form.0ea6e6052ab5.js", "rest_framework/js/prettify-min.js": "rest_framework/js/prettify-min.709bfcc456c6.js", "rest_framework/js/csrf.js": "rest_framework/js/csrf.969930007329.js", "rest_framework/js/jquery-3.5.1.min.js": "rest_framework/js/jquery-3.5.1.min.dc5e7f18c8d3.js", "rest_framework/js/bootstrap.min.js": "rest_framework/js/bootstrap.min.2f34b630ffe3.js", "rest_framework/js/default.js": "rest_framework/js/default.5b08897dbdc3.js", "rest_framework/js/coreapi-0.1.1.js": "rest_framework/js/coreapi-0.1.1.e580e3854595.js", "rest_framework/img/grid.png": "rest_framework/img/grid.a4b938cf382b.png", "rest_framework/img/glyphicons-halflings.png": "rest_framework/img/glyphicons-halflings.90233c9067e9.png", "rest_framework/img/glyphicons-halflings-white.png": "rest_framework/img/glyphicons-halflings-white.9bbc6e960299.png", "rest_framework/fonts/fontawesome-webfont.svg": "rest_framework/fonts/fontawesome-webfont.83e37a11f9d7.svg", "rest_framework/fonts/glyphicons-halflings-regular.woff": "rest_framework/fonts/glyphicons-halflings-regular.fa2772327f55.woff", "rest_framework/fonts/glyphicons-halflings-regular.eot": "rest_framework/fonts/glyphicons-halflings-regular.f4769f9bdb74.eot", "rest_framework/fonts/glyphicons-halflings-regular.woff2": "rest_framework/fonts/glyphicons-halflings-regular.448c34a56d69.woff2", "rest_framework/fonts/glyphicons-halflings-regular.ttf": "rest_framework/fonts/glyphicons-halflings-regular.e18bbf611f2a.ttf", "rest_framework/fonts/fontawesome-webfont.ttf": "rest_framework/fonts/fontawesome-webfont.dcb26c7239d8.ttf", "rest_framework/fonts/fontawesome-webfont.woff": "rest_framework/fonts/fontawesome-webfont.3293616ec0c6.woff", "rest_framework/fonts/glyphicons-halflings-regular.svg": "rest_framework/fonts/glyphicons-halflings-regular.08eda92397ae.svg", "rest_framework/fonts/fontawesome-webfont.eot": "rest_framework/fonts/fontawesome-webfont.8b27bc96115c.eot", "admin/css/widgets.css": "admin/css/widgets.694d845b2cb1.css", "admin/css/login.css": "admin/css/login.8b76a9f7cbf6.css", "admin/css/dashboard.css": "admin/css/dashboard.be83f13e4369.css", "admin/css/nav_sidebar.css": "admin/css/nav_sidebar.e32d345464bd.css", "admin/css/responsive.css": "admin/css/responsive.b9e1565b3609.css", "admin/css/autocomplete.css": "admin/css/autocomplete.4a81fc4242d0.css", "admin/css/responsive_rtl.css": "admin/css/responsive_rtl.e13ae754cceb.css", "admin/css/forms.css": "admin/css/forms.332ab41432e2.css", "admin/css/fonts.css": "admin/css/fonts.168bab448fee.css", "admin/css/rtl.css": "admin/css/rtl.4bc23eb90919.css", "admin/css/base.css": "admin/css/base.1f418065fc2c.css", "admin/css/changelists.css": "admin/css/changelists.cd4dd90ae1a1.css", "admin/js/urlify.js": "admin/js/urlify.25cc3eac8123.js", "admin/js/core.js": "admin/js/core.5d6b384a08b5.js", "admin/js/collapse.js": "admin/js/collapse.f84e7410290f.js", "admin/js/actions.js": "admin/js/actions.eac7e3441574.js", "admin/js/prepopulate.js": "admin/js/prepopulate.bd2361dfd64d.js", "admin/js/cancel.js": "admin/js/cancel.ecc4c5ca7b32.js", "admin/js/nav_sidebar.js": "admin/js/nav_sidebar.36a64ecb39ed.js", "admin/js/autocomplete.js": "admin/js/autocomplete.c508b167ab61.js", "admin/js/inlines.js": "admin/js/inlines.fb1617228dbe.js", "admin/js/change_form.js": "admin/js/change_form.9d8ca4f96b75.js", "admin/js/SelectFilter2.js": "admin/js/SelectFilter2.d250dcb52a9a.js", "admin/js/jquery.init.js": "admin/js/jquery.init.b7781a0897fc.js", "admin/js/popup_response.js": "admin/js/popup_response.c6cc78ea5551.js", "admin/js/SelectBox.js": "admin/js/SelectBox.8161741c7647.js", "admin/js/calendar.js": "admin/js/calendar.f8a5d055eb33.js", "admin/js/prepopulate_init.js": "admin/js/prepopulate_init.e056047b7a7e.js", "admin/img/search.svg": "admin/img/search.7cf54ff789c6.svg", "admin/img/icon-calendar.svg": "admin/img/icon-calendar.ac7aea671bea.svg", "admin/img/icon-clock.svg": "admin/img/icon-clock.e1d4dfac3f2b.svg", "admin/img/icon-no.svg": "admin/img/icon-no.439e821418cd.svg", "admin/img/tooltag-add.svg": "admin/img/tooltag-add.e59d620a9742.svg", "admin/img/inline-delete.svg": "admin/img/inline-delete.fec1b761f254.svg", "admin/img/LICENSE": "admin/img/LICENSE.2c54f4e1ca1c", "admin/img/icon-changelink.svg": "admin/img/icon-changelink.18d2fd706348.svg", "admin/img/icon-unknown.svg": "admin/img/icon-unknown.a18cb4398978.svg", "admin/img/sorting-icons.svg": "admin/img/sorting-icons.3a097b59f104.svg", "admin/img/icon-viewlink.svg": "admin/img/icon-viewlink.41eb31f7826e.svg", "admin/img/icon-yes.svg": "admin/img/icon-yes.d2f9f035226a.svg", "admin/img/icon-addlink.svg": "admin/img/icon-addlink.d519b3bab011.svg", "admin/img/icon-unknown-alt.svg": "admin/img/icon-unknown-alt.81536e128bb6.svg", "admin/img/icon-deletelink.svg": "admin/img/icon-deletelink.564ef9dc3854.svg", "admin/img/README.txt": "admin/img/README.a70711a38d87.txt", "admin/img/selector-icons.svg": "admin/img/selector-icons.b4555096cea2.svg", "admin/img/calendar-icons.svg": "admin/img/calendar-icons.39b290681a8b.svg", "admin/img/tooltag-arrowright.svg": "admin/img/tooltag-arrowright.bbfb788a849e.svg", "admin/img/icon-alert.svg": "admin/img/icon-alert.034cc7d8a67f.svg", "admin/fonts/Roboto-Light-webfont.woff": "admin/fonts/Roboto-Light-webfont.c73eb1ceba33.woff", "admin/fonts/Roboto-Bold-webfont.woff": "admin/fonts/Roboto-Bold-webfont.50d75e48e0a3.woff", "admin/fonts/Roboto-Regular-webfont.woff": "admin/fonts/Roboto-Regular-webfont.35b07eb2f871.woff", "admin/fonts/README.txt": "admin/fonts/README.ab99e6b541ea.txt", "admin/fonts/LICENSE.txt": "admin/fonts/LICENSE.d273d63619c9.txt", "import_export/import.css": "import_export/import.87299a479910.css", "import_export/action_formats.js": "import_export/action_formats.11c3e817b80a.js"}, "version": "1.0"}
\ No newline at end of file