@hpcc-js/layout 2.30.0 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +3 -100
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +3 -100
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +10 -10
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
- package/CHANGELOG.md +0 -6110
package/dist/index.es6.js
CHANGED
|
@@ -3,8 +3,8 @@ import { Table } from '@hpcc-js/dgrid';
|
|
|
3
3
|
import { instanceOfIHighlight } from '@hpcc-js/api';
|
|
4
4
|
|
|
5
5
|
var PKG_NAME = "@hpcc-js/layout";
|
|
6
|
-
var PKG_VERSION = "2.
|
|
7
|
-
var BUILD_VERSION = "2.
|
|
6
|
+
var PKG_VERSION = "2.36.0";
|
|
7
|
+
var BUILD_VERSION = "2.88.0";
|
|
8
8
|
|
|
9
9
|
/*! *****************************************************************************
|
|
10
10
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1512,7 +1512,7 @@ Path.prototype = path.prototype = {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
},
|
|
1514
1514
|
arc: function(x, y, r, a0, a1, ccw) {
|
|
1515
|
-
x = +x, y = +y, r = +r;
|
|
1515
|
+
x = +x, y = +y, r = +r, ccw = !!ccw;
|
|
1516
1516
|
var dx = r * Math.cos(a0),
|
|
1517
1517
|
dy = r * Math.sin(a0),
|
|
1518
1518
|
x0 = x + dx,
|
|
@@ -1705,103 +1705,6 @@ function d3Symbol() {
|
|
|
1705
1705
|
return symbol;
|
|
1706
1706
|
}
|
|
1707
1707
|
|
|
1708
|
-
function sign(x) {
|
|
1709
|
-
return x < 0 ? -1 : 1;
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
// Calculate the slopes of the tangents (Hermite-type interpolation) based on
|
|
1713
|
-
// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
|
|
1714
|
-
// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
|
|
1715
|
-
// NOV(II), P. 443, 1990.
|
|
1716
|
-
function slope3(that, x2, y2) {
|
|
1717
|
-
var h0 = that._x1 - that._x0,
|
|
1718
|
-
h1 = x2 - that._x1,
|
|
1719
|
-
s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
|
|
1720
|
-
s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
|
|
1721
|
-
p = (s0 * h1 + s1 * h0) / (h0 + h1);
|
|
1722
|
-
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
// Calculate a one-sided slope.
|
|
1726
|
-
function slope2(that, t) {
|
|
1727
|
-
var h = that._x1 - that._x0;
|
|
1728
|
-
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
|
|
1732
|
-
// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
|
|
1733
|
-
// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
|
|
1734
|
-
function point(that, t0, t1) {
|
|
1735
|
-
var x0 = that._x0,
|
|
1736
|
-
y0 = that._y0,
|
|
1737
|
-
x1 = that._x1,
|
|
1738
|
-
y1 = that._y1,
|
|
1739
|
-
dx = (x1 - x0) / 3;
|
|
1740
|
-
that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
function MonotoneX(context) {
|
|
1744
|
-
this._context = context;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
MonotoneX.prototype = {
|
|
1748
|
-
areaStart: function() {
|
|
1749
|
-
this._line = 0;
|
|
1750
|
-
},
|
|
1751
|
-
areaEnd: function() {
|
|
1752
|
-
this._line = NaN;
|
|
1753
|
-
},
|
|
1754
|
-
lineStart: function() {
|
|
1755
|
-
this._x0 = this._x1 =
|
|
1756
|
-
this._y0 = this._y1 =
|
|
1757
|
-
this._t0 = NaN;
|
|
1758
|
-
this._point = 0;
|
|
1759
|
-
},
|
|
1760
|
-
lineEnd: function() {
|
|
1761
|
-
switch (this._point) {
|
|
1762
|
-
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
1763
|
-
case 3: point(this, this._t0, slope2(this, this._t0)); break;
|
|
1764
|
-
}
|
|
1765
|
-
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
1766
|
-
this._line = 1 - this._line;
|
|
1767
|
-
},
|
|
1768
|
-
point: function(x, y) {
|
|
1769
|
-
var t1 = NaN;
|
|
1770
|
-
|
|
1771
|
-
x = +x, y = +y;
|
|
1772
|
-
if (x === this._x1 && y === this._y1) return; // Ignore coincident points.
|
|
1773
|
-
switch (this._point) {
|
|
1774
|
-
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
1775
|
-
case 1: this._point = 2; break;
|
|
1776
|
-
case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
|
|
1777
|
-
default: point(this, this._t0, t1 = slope3(this, x, y)); break;
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
this._x0 = this._x1, this._x1 = x;
|
|
1781
|
-
this._y0 = this._y1, this._y1 = y;
|
|
1782
|
-
this._t0 = t1;
|
|
1783
|
-
}
|
|
1784
|
-
};
|
|
1785
|
-
|
|
1786
|
-
function MonotoneY(context) {
|
|
1787
|
-
this._context = new ReflectContext(context);
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
|
|
1791
|
-
MonotoneX.prototype.point.call(this, y, x);
|
|
1792
|
-
};
|
|
1793
|
-
|
|
1794
|
-
function ReflectContext(context) {
|
|
1795
|
-
this._context = context;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
ReflectContext.prototype = {
|
|
1799
|
-
moveTo: function(x, y) { this._context.moveTo(y, x); },
|
|
1800
|
-
closePath: function() { this._context.closePath(); },
|
|
1801
|
-
lineTo: function(x, y) { this._context.lineTo(y, x); },
|
|
1802
|
-
bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
|
|
1803
|
-
};
|
|
1804
|
-
|
|
1805
1708
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
1806
1709
|
return typeof obj;
|
|
1807
1710
|
} : function (obj) {
|