@node-projects/web-component-designer 0.0.250 → 0.0.251

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.
@@ -73,8 +73,8 @@ export function CalculateGridInformation(designItem) {
73
73
  yOffset += gp;
74
74
  }
75
75
  const retVal = { cells: [], gaps: [] };
76
- for (let xIdx = 0; xIdx < rows.length; xIdx++) {
77
- const r = rows[xIdx];
76
+ for (let rowIdx = 0; rowIdx < rows.length; rowIdx++) {
77
+ const r = rows[rowIdx];
78
78
  let areas = null;
79
79
  if (gridA && gridA[rw + 1]) {
80
80
  areas = gridA[rw + 1].split(' ');
@@ -84,15 +84,15 @@ export function CalculateGridInformation(designItem) {
84
84
  const currY = Number.parseFloat(r.replace('px', ''));
85
85
  let cellList = [];
86
86
  retVal.cells.push(cellList);
87
- for (let yIdx = 0; yIdx < columns.length; yIdx++) {
88
- const c = columns[yIdx];
89
- if (x > 0) {
90
- retVal.gaps.push({ x: x + xOffset + paddingLeft, y: y + yOffset + paddingTop, width: xGap, height: currY, column: yIdx, row: xIdx, type: 'v' });
87
+ for (let colIdx = 0; colIdx < columns.length; colIdx++) {
88
+ const c = columns[colIdx];
89
+ if (colIdx > 0) {
90
+ retVal.gaps.push({ x: x + xOffset + paddingLeft, y: y + yOffset + paddingTop, width: xGap, height: currY, column: colIdx, row: rowIdx, type: 'v' });
91
91
  x += xGap;
92
92
  }
93
93
  const currX = Number.parseFloat(c.replace('px', ''));
94
- if (y > 0) {
95
- retVal.gaps.push({ x: x + xOffset + paddingLeft, y: y + yOffset - yGap + paddingTop, width: currX, height: yGap, column: yIdx, row: xIdx, type: 'h' });
94
+ if (rowIdx > 0) {
95
+ retVal.gaps.push({ x: x + xOffset + paddingLeft, y: y + yOffset - yGap + paddingTop, width: currX, height: yGap, column: colIdx, row: rowIdx, type: 'h' });
96
96
  }
97
97
  let name = null;
98
98
  if (areas && areas[cl]) {
@@ -12,12 +12,10 @@ export class DisplayGridExtension extends AbstractExtension {
12
12
  super(extensionManager, designerView, extendedItem);
13
13
  }
14
14
  extend(event) {
15
- console.log('extend');
16
15
  this._initSVGArrays();
17
16
  this.refresh(event);
18
17
  }
19
18
  refresh(event) {
20
- console.log('refresh');
21
19
  this.gridInformation = CalculateGridInformation(this.extendedItem);
22
20
  let cells = this.gridInformation.cells;
23
21
  if (!this._group) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A UI designer for Polymer apps",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.0.250",
4
+ "version": "0.0.251",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "",