Commit 10acd94d authored by Christian Hansen's avatar Christian Hansen Committed by Anton Koch

fixed broken mobile view

parent 6498b3f9
...@@ -183,8 +183,6 @@ ...@@ -183,8 +183,6 @@
let cellWidth = elWidth / Math.round(elWidth / (cellHeight * cellSizeRatio)) let cellWidth = elWidth / Math.round(elWidth / (cellHeight * cellSizeRatio))
let gridWidth = cellWidth * this.gridMetadata.columns let gridWidth = cellWidth * this.gridMetadata.columns
let cellsPerWidth = elWidth / cellWidth let cellsPerWidth = elWidth / cellWidth
let cellWidthMini = elWidth / this.gridMetadata.columns
let gridHeightMini = cellWidthMini / cellSizeRatio
this.gridDimensions = { this.gridDimensions = {
full: { full: {
width: gridWidth, width: gridWidth,
...@@ -194,31 +192,13 @@ ...@@ -194,31 +192,13 @@
height: cellHeight height: cellHeight
}, },
cells_per_width: cellsPerWidth cells_per_width: cellsPerWidth
},
mini: {
width: elWidth,
height: gridHeightMini * this.gridMetadata.rows,
cell: {
width: cellWidthMini,
height: gridHeightMini
}
} }
} }
if (elWidth > 800) { this.gridStyle = {
this.gridStyle = { width: gridWidth + 'px',
width: this.gridDimensions.full.width + 'px', height: '100%',
height: '100%', 'grid-auto-columns': cellWidth + 'px',
'grid-auto-columns': this.gridDimensions.full.cell.width + 'px', 'grid-auto-rows': cellHeight + 'px'
'grid-auto-rows': this.gridDimensions.full.cell.height + 'px'
}
}
else {
this.gridStyle = {
width: '100%',
height: this.gridDimensions.mini.height + 'px',
'grid-auto-columns': this.gridDimensions.mini.cell.width + 'px',
'grid-auto-rows': this.gridDimensions.mini.cell.height + 'px'
}
} }
}, },
getGridMetadataAnnotation (id, metadata) { getGridMetadataAnnotation (id, metadata) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment