publ-echo 0.0.39 → 0.0.41

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.
@@ -1,10 +1,13 @@
1
1
  export function calcGridColWidth(positionParams) {
2
2
  var margin = positionParams.margin, containerPadding = positionParams.containerPadding, containerWidth = positionParams.containerWidth, cols = positionParams.cols;
3
- return (Math.floor((containerWidth - margin[0] * (cols - 1) - containerPadding[0] * 2) / cols));
3
+ console.log('calcGridColWidth called', { margin: margin, containerPadding: containerPadding, containerWidth: containerWidth, cols: cols });
4
+ return ((containerWidth - margin[0] * (cols - 1) - containerPadding[0] * 2) / cols);
4
5
  }
5
6
  export function calcGridItemWHPx(gridUnits, colOrRowSize, marginPx) {
6
7
  if (!Number.isFinite(gridUnits))
7
8
  return gridUnits;
9
+ console.log('calcGridItemWHPx called', { colOrRowSize: colOrRowSize, gridUnits: gridUnits, marginPx: marginPx });
10
+ console.log('calcGridItemWHPx result: ', Math.round(colOrRowSize * gridUnits + Math.max(0, gridUnits - 1) * marginPx));
8
11
  return Math.round(colOrRowSize * gridUnits + Math.max(0, gridUnits - 1) * marginPx);
9
12
  }
10
13
  export var resolveRowHeight = function (rowHeight, width) {
@@ -38,6 +41,8 @@ export function calcGridItemPosition(positionParams, x, y, z, w, h, state) {
38
41
  else {
39
42
  result.top = Math.round((rowHeightNumber + margin[1]) * y + containerPadding[1]);
40
43
  result.left = Math.round((colWidth + margin[0]) * x + containerPadding[0]);
44
+ console.log('top origin:', { rowHeightNumber: rowHeightNumber, margin: margin[1], y: y, containerPadding: containerPadding[1] });
45
+ console.log('left origin:', { colWidth: colWidth, margin: margin[0], x: x, containerPadding: containerPadding[0] });
41
46
  }
42
47
  return result;
43
48
  }
@@ -415,6 +415,7 @@ export function perc(num) {
415
415
  }
416
416
  export function setTransform(_a) {
417
417
  var top = _a.top, left = _a.left, z = _a.z, width = _a.width, height = _a.height;
418
+ console.log('setTransform [left,top]', left, top);
418
419
  var translate = "translate(".concat(left, "px,").concat(top, "px)");
419
420
  return {
420
421
  transform: translate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",