@visactor/vstory 0.0.9-alpha.4 → 0.0.11

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
@@ -25384,7 +25384,7 @@
25384
25384
  var container = this._container;
25385
25385
  if (!container) return;
25386
25386
  var canvas = document.createElement("canvas");
25387
- canvas.style.position = "absolute", canvas.id = "_visactor_story_canvas_".concat(this._story.id), this._canvas = canvas, container.appendChild(canvas);
25387
+ canvas.id = "_visactor_story_canvas_".concat(this._story.id), this._canvas = canvas, container.appendChild(canvas);
25388
25388
  var stage = this._initCanvas(canvas, container.clientWidth, container.clientHeight, dpr);
25389
25389
  this._stage = stage;
25390
25390
  }
@@ -29399,7 +29399,6 @@
29399
29399
  // rounded value
29400
29400
  this.t = 0; // exact error
29401
29401
  },
29402
-
29403
29402
  add: function add(y) {
29404
29403
  _add(temp, y, this.t);
29405
29404
  _add(this, temp.s, this.s);
@@ -30053,7 +30052,6 @@
30053
30052
  }
30054
30053
  };
30055
30054
  }
30056
-
30057
30055
  function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {
30058
30056
  var cosPhi0,
30059
30057
  cosPhi1,
@@ -30323,7 +30321,6 @@
30323
30321
  function corner(p, direction) {
30324
30322
  return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon
30325
30323
  }
30326
-
30327
30324
  function compareIntersection(a, b) {
30328
30325
  return comparePoint(a.x, b.x);
30329
30326
  }
@@ -39999,7 +39996,7 @@
39999
39996
  endIndex = newDomain.length - 1,
40000
39997
  x0 = newDomain[startIndex],
40001
39998
  x1 = newDomain[endIndex];
40002
- return x1 < x0 && ((_ref = [endIndex, startIndex], startIndex = _ref[0], endIndex = _ref[1]), (_ref2 = [x1, x0], x0 = _ref2[0], x1 = _ref2[1])), newDomain[startIndex] = options.floor(x0), newDomain[endIndex] = options.ceil(x1), newDomain;
39999
+ return x1 < x0 && (_ref = [endIndex, startIndex], startIndex = _ref[0], endIndex = _ref[1], _ref2 = [x1, x0], x0 = _ref2[0], x1 = _ref2[1]), newDomain[startIndex] = options.floor(x0), newDomain[endIndex] = options.ceil(x1), newDomain;
40003
40000
  };
40004
40001
  var niceNumber = function niceNumber(value) {
40005
40002
  var round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
@@ -66779,7 +66776,7 @@
66779
66776
  stateStyle || (stateStyle = this.stateStyle.normal[key]);
66780
66777
  var baseValueFunctor = this._computeStateAttribute(stateStyle, key, state),
66781
66778
  hasPostProcess = isFunction$1(null == stateStyle ? void 0 : stateStyle.postProcess),
66782
- hasExCompute = (key in this._computeExChannel);
66779
+ hasExCompute = key in this._computeExChannel;
66783
66780
  if (hasPostProcess && hasExCompute) {
66784
66781
  var exCompute = this._computeExChannel[key];
66785
66782
  return function (datum, opt) {
@@ -87551,7 +87548,7 @@
87551
87548
  position = null === (_a = this._spec.outerLabel) || void 0 === _a ? void 0 : _a.position,
87552
87549
  textAlign = "center",
87553
87550
  textBaseline = "middle";
87554
- if (position = this._isHorizontal() ? ["top", "bottom"].includes(position) ? position : "bottom" === this._funnelAlign ? "top" : "bottom" : ["left", "right"].includes(position) ? position : "left" === this._funnelAlign ? "right" : "left", !1 !== (null === (_b = this._spec.outerLabel) || void 0 === _b ? void 0 : _b.alignLabel)) (_this$_getPositionByD2 = this._getPositionByData(datum), x = _this$_getPositionByD2.x, y = _this$_getPositionByD2.y), "left" === position ? (x = 0, textAlign = "left") : "right" === position ? (x = this.getLayoutRect().width, textAlign = "right") : "top" === position ? (y = 0, textBaseline = "top") : "bottom" === position && (y = this.getLayoutRect().height, textBaseline = "bottom");else {
87551
+ if (position = this._isHorizontal() ? ["top", "bottom"].includes(position) ? position : "bottom" === this._funnelAlign ? "top" : "bottom" : ["left", "right"].includes(position) ? position : "left" === this._funnelAlign ? "right" : "left", !1 !== (null === (_b = this._spec.outerLabel) || void 0 === _b ? void 0 : _b.alignLabel)) _this$_getPositionByD2 = this._getPositionByData(datum), x = _this$_getPositionByD2.x, y = _this$_getPositionByD2.y, "left" === position ? (x = 0, textAlign = "left") : "right" === position ? (x = this.getLayoutRect().width, textAlign = "right") : "top" === position ? (y = 0, textBaseline = "top") : "bottom" === position && (y = this.getLayoutRect().height, textBaseline = "bottom");else {
87555
87552
  var _this$_computeOuterLa = this._computeOuterLabelLinePosition(datum),
87556
87553
  x2 = _this$_computeOuterLa.x2,
87557
87554
  y2 = _this$_computeOuterLa.y2;
@@ -99296,14 +99293,14 @@
99296
99293
  return isValid$3(point) ? "regionLeft" === offset ? region.getLayoutStartPoint().x - point.x : "regionRight" === offset ? region.getLayoutStartPoint().x + region.getLayoutRect().width - point.x : "regionTop" === offset ? region.getLayoutStartPoint().y - point.y : "regionBottom" === offset ? region.getLayoutStartPoint().y + region.getLayoutRect().height - point.y : offset : offset;
99297
99294
  }
99298
99295
  function getMarkLineProcessInfo(spec) {
99299
- var isXProcess = ("x" in spec),
99300
- isYProcess = ("y" in spec),
99301
- isX1Process = ("x1" in spec),
99302
- isY1Process = ("y1" in spec),
99303
- isAngleProcess = ("angle" in spec),
99304
- isRadiusProcess = ("radius" in spec),
99305
- isAngle1Process = ("angle1" in spec),
99306
- isRadius1Process = ("radius1" in spec);
99296
+ var isXProcess = "x" in spec,
99297
+ isYProcess = "y" in spec,
99298
+ isX1Process = "x1" in spec,
99299
+ isY1Process = "y1" in spec,
99300
+ isAngleProcess = "angle" in spec,
99301
+ isRadiusProcess = "radius" in spec,
99302
+ isAngle1Process = "angle1" in spec,
99303
+ isRadius1Process = "radius1" in spec;
99307
99304
  return {
99308
99305
  doXProcess: isXProcess && !isYProcess && !isY1Process,
99309
99306
  doXYY1Process: isXProcess && isYProcess && isY1Process,
@@ -99319,14 +99316,14 @@
99319
99316
  };
99320
99317
  }
99321
99318
  function getMarkAreaProcessInfo(spec) {
99322
- var isXProcess = ("x" in spec),
99323
- isX1Process = ("x1" in spec),
99324
- isYProcess = ("y" in spec),
99325
- isY1Process = ("y1" in spec),
99326
- isAngleProcess = ("angle" in spec),
99327
- isRadiusProcess = ("radius" in spec),
99328
- isAngle1Process = ("angle1" in spec),
99329
- isRadius1Process = ("radius1" in spec);
99319
+ var isXProcess = "x" in spec,
99320
+ isX1Process = "x1" in spec,
99321
+ isYProcess = "y" in spec,
99322
+ isY1Process = "y1" in spec,
99323
+ isAngleProcess = "angle" in spec,
99324
+ isRadiusProcess = "radius" in spec,
99325
+ isAngle1Process = "angle1" in spec,
99326
+ isRadius1Process = "radius1" in spec;
99330
99327
  return {
99331
99328
  doXProcess: isXProcess && isX1Process && !isYProcess && !isY1Process,
99332
99329
  doYProcess: isYProcess && isY1Process && !isXProcess && !isX1Process,
@@ -99889,7 +99886,7 @@
99889
99886
  value: function _initDataView() {
99890
99887
  var _this2 = this;
99891
99888
  var spec = this._spec,
99892
- isCoordinateProcess = ("coordinates" in spec),
99889
+ isCoordinateProcess = "coordinates" in spec,
99893
99890
  _getMarkLineProcessIn = getMarkLineProcessInfo(spec),
99894
99891
  doXProcess = _getMarkLineProcessIn.doXProcess,
99895
99892
  doYProcess = _getMarkLineProcessIn.doYProcess,
@@ -101785,8 +101782,8 @@
101785
101782
  data = this._markerData,
101786
101783
  relativeSeries = this._relativeSeries,
101787
101784
  isXYLayout = "x" in spec && "y" in spec,
101788
- isCoordinateLayout = ("coordinate" in spec),
101789
- isPositionLayout = ("position" in spec),
101785
+ isCoordinateLayout = "coordinate" in spec,
101786
+ isPositionLayout = "position" in spec,
101790
101787
  autoRange = null !== (_a = null == spec ? void 0 : spec.autoRange) && void 0 !== _a && _a;
101791
101788
  var point;
101792
101789
  return isXYLayout ? point = xyLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)[0][0] : isCoordinateLayout ? point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset)[0] : isPositionLayout && (point = positionLayout(spec.position, relativeSeries, spec.regionRelative)[0]), {