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

fixed broken mobile view

parent 6498b3f9
......@@ -183,8 +183,6 @@
let cellWidth = elWidth / Math.round(elWidth / (cellHeight * cellSizeRatio))
let gridWidth = cellWidth * this.gridMetadata.columns
let cellsPerWidth = elWidth / cellWidth
let cellWidthMini = elWidth / this.gridMetadata.columns
let gridHeightMini = cellWidthMini / cellSizeRatio
this.gridDimensions = {
full: {
width: gridWidth,
......@@ -194,31 +192,13 @@
height: cellHeight
},
cells_per_width: cellsPerWidth
},
mini: {
width: elWidth,
height: gridHeightMini * this.gridMetadata.rows,
cell: {
width: cellWidthMini,
height: gridHeightMini
}
}
}
if (elWidth > 800) {
this.gridStyle = {
width: this.gridDimensions.full.width + 'px',
height: '100%',
'grid-auto-columns': this.gridDimensions.full.cell.width + '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'
}
this.gridStyle = {
width: gridWidth + 'px',
height: '100%',
'grid-auto-columns': cellWidth + 'px',
'grid-auto-rows': cellHeight + 'px'
}
},
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