Commit 969923a1 authored by Anton's avatar Anton
Browse files

Use styleClass property from cell annotation targets

parent a3f2f818
......@@ -5,7 +5,7 @@
component(
:is="cellTypeName",
:cell="cell",
:class="'cell-content cell-type-' + cell.type.toLowerCase()",
:class="cellClasses",
:display="display",
:preview="preview",
:messenger="messenger")
......@@ -30,6 +30,14 @@
computed: {
cellTypeName () {
return this.cell.type ? this.cellTypeToClassName(this.cell.type) : ''
},
cellClasses () {
const classes = ['cell-content']
if (this.cell) {
if (this.cell.type) classes.push(`cell-type-${this.cell.type.toLowerCase()}`)
if (this.cell.styleClass) classes.push(this.cell.styleClass.substr(1))
}
return classes
}
},
mounted () {
......
......@@ -76,6 +76,7 @@
if (cell) {
cell.uuid = annotation.uuid
cell.id = annotation.id
cell.styleClass = annotation.target ? annotation.target.styleClass : undefined
cells.push(cell)
}
}
......
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