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