publ-echo 0.0.97 → 0.0.98

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.
@@ -81,7 +81,7 @@ var GridItem = function (_a) {
81
81
  var _a = calcWH(getPositionParams(), {
82
82
  width: width,
83
83
  height: height,
84
- }, x, y, 'e', props.w, props.h, true), w_1 = _a.w, h_1 = _a.h;
84
+ }, x, y, 'e', props.w, props.h, false), w_1 = _a.w, h_1 = _a.h;
85
85
  if (keepWidth) {
86
86
  w_1 = prevW;
87
87
  }
@@ -59,7 +59,7 @@ export function calcWH(positionParams, _a, x, y, handleAxis, prevW, prevH, shoul
59
59
  var rowHeightNumber = resolveRowHeight(rowHeight, colWidth);
60
60
  var roundOrCeil = shouldCeil ? Math.ceil : Math.round;
61
61
  var w = roundOrCeil((width + margin[0]) / (colWidth + margin[0]));
62
- var h = roundOrCeil((height + margin[1]) / (rowHeightNumber + margin[1]));
62
+ var h = roundOrCeil(roundToOneDecimal((height + margin[1]) / (rowHeightNumber + margin[1])));
63
63
  // // Capping
64
64
  // w = clamp(w, 0, cols - x);
65
65
  // h = clamp(h, 0, maxRows - y);
@@ -107,3 +107,6 @@ export function calcWH(positionParams, _a, x, y, handleAxis, prevW, prevH, shoul
107
107
  export function clamp(num, lowerBound, upperBound) {
108
108
  return Math.max(Math.min(num, upperBound), lowerBound);
109
109
  }
110
+ function roundToOneDecimal(num) {
111
+ return Math.floor(num * 10) / 10;
112
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo",
3
- "version": "0.0.97",
3
+ "version": "0.0.98",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",