pds-dev-kit-web-test 2.7.459 → 2.7.460

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.
@@ -11,7 +11,7 @@ export declare function getGridAreaFromGroup(position: {
11
11
  y: number;
12
12
  cols: number;
13
13
  rows: number;
14
- }): {
14
+ }, device: 'MOBILE' | 'DESKTOP'): {
15
15
  rowStart: number;
16
16
  colStart: number;
17
17
  rowEnd: number;
@@ -39,12 +39,13 @@ function gridAreaObjToString(area) {
39
39
  return "".concat(rowStart, " / ").concat(colStart, " / ").concat(rowEnd, " / ").concat(colEnd);
40
40
  }
41
41
  exports.gridAreaObjToString = gridAreaObjToString;
42
- function getGridAreaFromGroup(position) {
42
+ function getGridAreaFromGroup(position, device) {
43
43
  var x = position.x, y = position.y, cols = position.cols, rows = position.rows;
44
- var colStart = clamp(x + 1, 1, Math.max(1, 25 - cols));
44
+ var maxCols = device === 'MOBILE' ? 9 : 25;
45
+ var colStart = clamp(x + 1, 1, Math.max(1, maxCols - cols));
45
46
  var rowStart = clamp(y + 1, 1, Infinity);
46
47
  var rowEnd = clamp(rows + rowStart, rowStart + 1, Infinity);
47
- var colEnd = clamp(colStart + cols, colStart + 1, 25);
48
+ var colEnd = clamp(colStart + cols, colStart + 1, maxCols);
48
49
  return {
49
50
  rowStart: rowStart,
50
51
  colStart: colStart,
@@ -40,7 +40,7 @@ function RenderPedigreeRecursively(_a) {
40
40
  y: bounding_1.y,
41
41
  cols: bounding_1.w,
42
42
  rows: bounding_1.h
43
- });
43
+ }, device);
44
44
  var relativeGridArea_1 = parentGroupArea
45
45
  ? (0, groupHelpers_1.calculateRelativeGridArea)(gridArea_1, parentGroupArea)
46
46
  : gridArea_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.459",
3
+ "version": "2.7.460",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",