evui 3.4.144 → 3.4.146

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.
@@ -11227,7 +11227,7 @@ var update = add("9519e5b6", content, true, {"sourceMap":false,"shadowMode":fals
11227
11227
  /***/ "9224":
11228
11228
  /***/ (function(module) {
11229
11229
 
11230
- module.exports = JSON.parse("{\"a\":\"3.4.144\"}");
11230
+ module.exports = JSON.parse("{\"a\":\"3.4.146\"}");
11231
11231
 
11232
11232
  /***/ }),
11233
11233
 
@@ -44332,19 +44332,25 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
44332
44332
  }, selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.borderStyle);
44333
44333
  }
44334
44334
 
44335
- if (borderOpt.show) {
44335
+ var isBorderDrawable = false;
44336
+
44337
+ if (borderOpt.show && borderOpt.lineWidth > 0) {
44336
44338
  var _borderOpt = borderOpt,
44337
44339
  color = _borderOpt.color,
44338
44340
  lineWidth = _borderOpt.lineWidth,
44339
44341
  borderOpacity = _borderOpt.opacity;
44340
- ctx.strokeStyle = helpers_util.colorStringToRgba(color, itemOpacity === 1 ? borderOpacity : itemOpacity); // item 사이즈 보다 border 선 굵기가 큰 경우 lineWidth props 무시
44342
+ var totalStrokeWidth = lineWidth * 2;
44343
+ isBorderDrawable = totalStrokeWidth < Math.floor(w) && totalStrokeWidth < Math.floor(h);
44344
+ ctx.strokeStyle = isBorderDrawable ? helpers_util.colorStringToRgba(color, itemOpacity === 1 ? borderOpacity : itemOpacity) : undefined; // item 사이즈 보다 border 선 굵기가 큰 경우 lineWidth props 무시
44341
44345
 
44342
- if (lineWidth < w && lineWidth < h) {
44346
+ if (isBorderDrawable) {
44343
44347
  ctx.lineWidth = lineWidth;
44344
- xp += lineWidth * 0.5;
44345
- yp += lineWidth * 0.5;
44346
- w -= lineWidth;
44347
- h -= lineWidth;
44348
+ xp += lineWidth;
44349
+ yp += lineWidth;
44350
+ w -= totalStrokeWidth;
44351
+ h -= totalStrokeWidth;
44352
+ } else {
44353
+ ctx.lineWidth = 0;
44348
44354
  }
44349
44355
  }
44350
44356
 
@@ -44354,7 +44360,9 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
44354
44360
  item.w = w;
44355
44361
  item.h = h;
44356
44362
 
44357
- _this2.drawItem(ctx, xp, yp, w, h, borderOpt);
44363
+ _this2.drawItem(ctx, xp, yp, w, h, _objectSpread2(_objectSpread2({}, borderOpt), {}, {
44364
+ show: isBorderDrawable
44365
+ }));
44358
44366
 
44359
44367
  ctx.restore();
44360
44368
 
@@ -44467,31 +44475,77 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
44467
44475
  ctx.restore();
44468
44476
  }
44469
44477
  /**
44470
- *Returns items in range
44471
- * @param {object} params range values
44472
- *
44473
- * @returns {array}
44478
+ * 자바스크립트 부동 소수점 오차 때문에 범위를 조정
44479
+ * @param {object} params - range information
44480
+ * @param {number} params.xp - start x position
44481
+ * @param {number} params.yp - start y position
44482
+ * @param {number} params.width - width
44483
+ * @param {number} params.height - height
44484
+ * @returns {object} adjusted range
44474
44485
  */
44475
44486
 
44476
44487
  }, {
44477
- key: "findItems",
44478
- value: function findItems(_ref3) {
44479
- var xsp = _ref3.xsp,
44480
- ysp = _ref3.ysp,
44488
+ key: "getAdjustedBounds",
44489
+ value: function getAdjustedBounds(_ref3) {
44490
+ var xp = _ref3.xp,
44491
+ yp = _ref3.yp,
44481
44492
  width = _ref3.width,
44482
44493
  height = _ref3.height;
44494
+ var PRECISION = 100;
44495
+ var adjustedWidth = Math.max(0, width);
44496
+ var adjustedHeight = Math.max(0, height);
44497
+ return {
44498
+ xsp: Math.floor(xp * PRECISION) / PRECISION,
44499
+ xep: Math.ceil((xp + adjustedWidth) * PRECISION) / PRECISION,
44500
+ ysp: Math.floor(yp * PRECISION) / PRECISION,
44501
+ yep: Math.ceil((yp + adjustedHeight) * PRECISION) / PRECISION
44502
+ };
44503
+ }
44504
+ /**
44505
+ *Returns items in range
44506
+ * @param {object} params - range information
44507
+ * @param {number} params.xsp - start x position
44508
+ * @param {number} params.width - width
44509
+ * @param {number} params.ysp - start y position
44510
+ * @param {number} params.height - height
44511
+ * @returns {array} items in range
44512
+ */
44513
+
44514
+ }, {
44515
+ key: "findItems",
44516
+ value: function findItems(params) {
44517
+ var _this3 = this;
44518
+
44483
44519
  var gdata = this.data;
44484
- var xep = xsp + width;
44485
- var yep = ysp + height;
44520
+
44521
+ var _this$getAdjustedBoun = this.getAdjustedBounds({
44522
+ xp: params.xsp,
44523
+ yp: params.ysp,
44524
+ width: params.width,
44525
+ height: params.height
44526
+ }),
44527
+ xsp = _this$getAdjustedBoun.xsp,
44528
+ xep = _this$getAdjustedBoun.xep,
44529
+ ysp = _this$getAdjustedBoun.ysp,
44530
+ yep = _this$getAdjustedBoun.yep;
44531
+
44486
44532
  return gdata.filter(function (_ref4) {
44487
44533
  var xp = _ref4.xp,
44488
44534
  yp = _ref4.yp,
44489
44535
  w = _ref4.w,
44490
44536
  h = _ref4.h;
44491
- var x1 = xp;
44492
- var x2 = xp + w;
44493
- var y1 = yp;
44494
- var y2 = yp + h;
44537
+
44538
+ var _this3$getAdjustedBou = _this3.getAdjustedBounds({
44539
+ xp: xp,
44540
+ yp: yp,
44541
+ width: w,
44542
+ height: h
44543
+ }),
44544
+ x1 = _this3$getAdjustedBou.xsp,
44545
+ x2 = _this3$getAdjustedBou.xep,
44546
+ y1 = _this3$getAdjustedBou.ysp,
44547
+ y2 = _this3$getAdjustedBou.yep;
44548
+
44495
44549
  return x1 >= xsp && x2 <= xep && y1 >= ysp && y2 <= yep;
44496
44550
  });
44497
44551
  }
@@ -44677,6 +44731,8 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
44677
44731
 
44678
44732
  if (findItem > -1) {
44679
44733
  point[key] = ['xsp', 'ysp'].includes(key) ? itemPoint : itemPoint + gap;
44734
+ } else if (target < startPoint) {
44735
+ point[key] = startPoint;
44680
44736
  }
44681
44737
  };
44682
44738