Skip to content

Commit

Permalink
v1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zeplin-dev committed Nov 3, 2021
1 parent ddb033f commit 4b70cf5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/models/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
export const transformGridToJSON = function (value: Grid): any {
return {
horizontal_offset: value.horizontalOffset,
vertical_offset: value.verticalOffset,
vertical: value.vertical && transformVerticalGridToJSON(value.vertical),
horizontal: value.horizontal && transformHorizontalGridToJSON(value.horizontal)
}
Expand All @@ -35,6 +36,7 @@ export const transformGridToJSON = function (value: Grid): any {
export const transformJSONToGrid = function (value: any): Grid {
return {
horizontalOffset: value.horizontal_offset,
verticalOffset: value.vertical_offset,
vertical: value.vertical && transformJSONToVerticalGrid(value.vertical),
horizontal: value.horizontal && transformJSONToHorizontalGrid(value.horizontal)
}
Expand All @@ -52,6 +54,12 @@ export interface Grid {
* @memberof Grid
*/
horizontalOffset?: number;
/**
*
* @type {number}
* @memberof Grid
*/
verticalOffset?: number;
/**
*
* @type {VerticalGrid}
Expand Down
12 changes: 10 additions & 2 deletions src/models/horizontal-grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
export const transformHorizontalGridToJSON = function (value: HorizontalGrid): any {
return {
gutter_height: value.gutterHeight,
row_height: value.rowHeight
row_height: value.rowHeight,
number_of_rows: value.numberOfRows
}
}

export const transformJSONToHorizontalGrid = function (value: any): HorizontalGrid {
return {
gutterHeight: value.gutter_height,
rowHeight: value.row_height
rowHeight: value.row_height,
numberOfRows: value.number_of_rows
}
}

Expand All @@ -46,6 +48,12 @@ export interface HorizontalGrid {
* @memberof HorizontalGrid
*/
rowHeight: number;
/**
*
* @type {number}
* @memberof HorizontalGrid
*/
numberOfRows?: number;
}


0 comments on commit 4b70cf5

Please sign in to comment.