Commit f551fdb1 authored by Anton's avatar Anton
Browse files

GridDisplay now injects stylesheet, if available for grid

parent 10630fa1
......@@ -2,7 +2,7 @@
div.cell-grid-container
div.cell-grid(:style="gridStyle")
style-tag(v-if="styles", :styles="styles")
template(v-for="(cell, index) in cells")
.cell-item(
:style="getCellStyle(cell)",
......@@ -18,12 +18,14 @@
<script>
import Vue from 'vue'
import Cell from './Cell'
import StyleTag from '../../shared/partials/StyleTag'
const MessengerComponent = Vue.component('grid-editor-messenger', {})
export default {
components: {
Cell
Cell,
StyleTag
},
props: ['gridUuid'],
data () {
......@@ -34,7 +36,8 @@
gridMetadata: {},
gridDimensions: { gridWidth: 0, gridHeight: 0, cellWidth: 0, cellHeight: 0 },
gridStyle: {},
messenger: new MessengerComponent()
messenger: new MessengerComponent(),
styles: undefined
}
},
async mounted () {
......@@ -46,6 +49,9 @@
// // console.log(videoUuid, time)
// })
this.grid = await this.$store.dispatch('maps/get', this.$route.params.id)
if (this.grid.stylesheet && this.grid.stylesheet.value) {
this.styles = [this.grid.stylesheet.value]
}
await this.fetchMetadataAnnotations()
this.updateGridDimensions()
await this.fetchCellAnnotations()
......
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