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

Use styleClass property from cell annotation targets

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