1
1
/**
2
- * plotly.js (basic) v2.18.0
2
+ * plotly.js (basic) v2.18.1
3
3
* Copyright 2012-2023, Plotly, Inc.
4
4
* All rights reserved.
5
5
* Licensed under the MIT license
@@ -7158,6 +7158,7 @@ module.exports = function plot(gd, traces, plotinfo, transitionOpts) {
7158
7158
var xa = plotinfo.xaxis;
7159
7159
var ya = plotinfo.yaxis;
7160
7160
var hasAnimation = transitionOpts && transitionOpts.duration > 0;
7161
+ var isStatic = gd._context.staticPlot;
7161
7162
traces.each(function (d) {
7162
7163
var trace = d[0].trace;
7163
7164
// || {} is in case the trace (specifically scatterternary)
@@ -7201,7 +7202,7 @@ module.exports = function plot(gd, traces, plotinfo, transitionOpts) {
7201
7202
7202
7203
isNew = !yerror.size();
7203
7204
if (isNew) {
7204
- yerror = errorbar.append('path').style('vector-effect', 'non-scaling-stroke').classed('yerror', true);
7205
+ yerror = errorbar.append('path').style('vector-effect', isStatic ? 'none' : 'non-scaling-stroke').classed('yerror', true);
7205
7206
} else if (hasAnimation) {
7206
7207
yerror = yerror.transition().duration(transitionOpts.duration).ease(transitionOpts.easing);
7207
7208
}
@@ -7218,7 +7219,7 @@ module.exports = function plot(gd, traces, plotinfo, transitionOpts) {
7218
7219
7219
7220
isNew = !xerror.size();
7220
7221
if (isNew) {
7221
- xerror = errorbar.append('path').style('vector-effect', 'non-scaling-stroke').classed('xerror', true);
7222
+ xerror = errorbar.append('path').style('vector-effect', isStatic ? 'none' : 'non-scaling-stroke').classed('xerror', true);
7222
7223
} else if (hasAnimation) {
7223
7224
xerror = xerror.transition().duration(transitionOpts.duration).ease(transitionOpts.easing);
7224
7225
}
@@ -9498,8 +9499,8 @@ function getLeftOffset(gd) {
9498
9499
function getBoundingClientRect(gd, node) {
9499
9500
var fullLayout = gd._fullLayout;
9500
9501
var rect = node.getBoundingClientRect();
9501
- var x0 = rect.x ;
9502
- var y0 = rect.y ;
9502
+ var x0 = rect.left ;
9503
+ var y0 = rect.top ;
9503
9504
var x1 = x0 + rect.width;
9504
9505
var y1 = y0 + rect.height;
9505
9506
var A = Lib.apply3DTransform(fullLayout._invTransform)(x0, y0);
@@ -23376,7 +23377,7 @@ function isTransformableElement(element) {
23376
23377
return element && (element instanceof Element || element instanceof HTMLElement);
23377
23378
}
23378
23379
function equalDomRects(a, b) {
23379
- return a && b && a.x === b.x && a.y === b.y && a. top === b.top && a.left === b.left && a.right === b.right && a.bottom === b.bottom;
23380
+ return a && b && a.top === b.top && a.left === b.left && a.right === b.right && a.bottom === b.bottom;
23380
23381
}
23381
23382
module.exports = {
23382
23383
getGraphDiv: getGraphDiv,
@@ -52427,6 +52428,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
52427
52428
var xa = plotinfo.xaxis;
52428
52429
var ya = plotinfo.yaxis;
52429
52430
var fullLayout = gd._fullLayout;
52431
+ var isStatic = gd._context.staticPlot;
52430
52432
if (!opts) {
52431
52433
opts = {
52432
52434
mode: fullLayout.barmode,
@@ -52556,7 +52558,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
52556
52558
y1 = fixpx(y1, y0, !isHorizontal);
52557
52559
}
52558
52560
var sel = transition(Lib.ensureSingle(bar, 'path'), fullLayout, opts, makeOnCompleteCallback);
52559
- sel.style('vector-effect', 'non-scaling-stroke').attr('d', isNaN((x1 - x0) * (y1 - y0)) || isBlank && gd._context.staticPlot ? 'M0,0Z' : 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z').call(Drawing.setClipUrl, plotinfo.layerClipId, gd);
52561
+ sel.style('vector-effect', isStatic ? 'none' : 'non-scaling-stroke').attr('d', isNaN((x1 - x0) * (y1 - y0)) || isBlank && gd._context.staticPlot ? 'M0,0Z' : 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z').call(Drawing.setClipUrl, plotinfo.layerClipId, gd);
52560
52562
if (!fullLayout.uniformtext.mode && withTransition) {
52561
52563
var styleFns = Drawing.makePointStyleFns(trace);
52562
52564
Drawing.singlePointStyle(di, sel, trace, styleFns, gd);
@@ -57330,6 +57332,7 @@ function createFills(gd, traceJoin, plotinfo) {
57330
57332
});
57331
57333
}
57332
57334
function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transitionOpts) {
57335
+ var isStatic = gd._context.staticPlot;
57333
57336
var i;
57334
57337
57335
57338
// Since this has been reorganized and we're executing this on individual traces,
@@ -57472,7 +57475,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
57472
57475
var lineJoin = lines.selectAll('.js-line').data(segments);
57473
57476
transition(lineJoin.exit()).style('opacity', 0).remove();
57474
57477
lineJoin.each(makeUpdate(false));
57475
- lineJoin.enter().append('path').classed('js-line', true).style('vector-effect', 'non-scaling-stroke').call(Drawing.lineGroupStyle).each(makeUpdate(true));
57478
+ lineJoin.enter().append('path').classed('js-line', true).style('vector-effect', isStatic ? 'none' : 'non-scaling-stroke').call(Drawing.lineGroupStyle).each(makeUpdate(true));
57476
57479
Drawing.setClipUrl(lineJoin, plotinfo.layerClipId, gd);
57477
57480
function clearFill(selection) {
57478
57481
transition(selection).attr('d', 'M0,0Z');
@@ -58956,7 +58959,7 @@ function getSortFunc(opts, d2c) {
58956
58959
58957
58960
58958
58961
// package version injected by `npm run preprocess`
58959
- exports.version = '2.18.0 ';
58962
+ exports.version = '2.18.1 ';
58960
58963
58961
58964
/***/ }),
58962
58965
0 commit comments