Commit 81b3462d authored by Anton's avatar Anton

fix eslint problems

parent 2fe19a0b
......@@ -133,12 +133,12 @@
// that is wrapped into a cell-annotation
const destUuid = cell.sourceUuid || cell.uuid
if (destUuid) {
this.$store.dispatch('annotations/find', {'uuid': destUuid})
this.$store.dispatch('annotations/find', { 'uuid': destUuid })
.then(annotations => {
const a = annotations.items.shift()
cell.content = value
a.body.value = JSON.stringify(cell)
_this.$store.dispatch('annotations/patch', [destUuid, {body: a.body, target: a.target}])
_this.$store.dispatch('annotations/patch', [destUuid, { body: a.body, target: a.target }])
})
}
}
......
......@@ -32,7 +32,7 @@
annotations: [],
cells: [],
gridMetadata: {},
gridDimensions: {gridWidth: 0, gridHeight: 0, cellWidth: 0, cellHeight: 0},
gridDimensions: { gridWidth: 0, gridHeight: 0, cellWidth: 0, cellHeight: 0 },
gridStyle: {},
messenger: new MessengerComponent()
}
......@@ -170,7 +170,7 @@
}
},
getCellStyle (cell) {
return {'grid-column-start': cell.x, 'grid-column-end': `span ${cell.width}`, 'grid-row-start': cell.y, 'grid-row-end': `span ${cell.height}`}
return { 'grid-column-start': cell.x, 'grid-column-end': `span ${cell.width}`, 'grid-row-start': cell.y, 'grid-row-end': `span ${cell.height}` }
}
}
}
......
......@@ -134,7 +134,7 @@
cells: [],
tmpCells: [],
cellUIStates: {},
gridDimensions: {gridWidth: 0, gridHeight: 0, cellWidth: 0, cellHeight: 0},
gridDimensions: { gridWidth: 0, gridHeight: 0, cellWidth: 0, cellHeight: 0 },
gridStyle: {},
contextMenuClickPosition: {},
resizingGrid: false
......@@ -243,7 +243,7 @@
}).shift()
let offset, position
if (!cell) {
cell = {uuid: null, x: 1, y: 1, width: 1, height: 1}
cell = { uuid: null, x: 1, y: 1, width: 1, height: 1 }
position = this.getGridPositionForEvent(event)
}
else {
......@@ -318,7 +318,7 @@
}
}
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, {columns: this.gridMetadata.columns + 1})
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, { columns: this.gridMetadata.columns + 1 })
await this.updateGridMetadataStore()
},
async handleGridContextMenuDeleteColumn () {
......@@ -332,7 +332,7 @@
}
}
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, {columns: this.gridMetadata.columns - 1})
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, { columns: this.gridMetadata.columns - 1 })
await this.updateGridMetadataStore()
},
async handleGridContextMenuInsertRowAbove () {
......@@ -345,7 +345,7 @@
await this.fetchCellAnnotations()
}
}
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, {rows: this.gridMetadata.rows + 1})
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, { rows: this.gridMetadata.rows + 1 })
await this.updateGridMetadataStore()
},
......@@ -359,7 +359,7 @@
await this.fetchCellAnnotations()
}
}
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, {rows: this.gridMetadata.rows - 1})
this.gridMetadata = ObjectUtil.merge({}, this.gridMetadata, { rows: this.gridMetadata.rows - 1 })
await this.updateGridMetadataStore()
},
......@@ -397,14 +397,14 @@
height: cell.height
}
},
getGridPositionForEvent (event, offset = {x: 0, y: 0}) {
offset = {x: 0, y: 0} // TODO: remove quick fix
getGridPositionForEvent (event, offset = { x: 0, y: 0 }) {
offset = { x: 0, y: 0 } // TODO: remove quick fix
const elContainerBoundingBox = this.$el.getBoundingClientRect()
const ox = event.clientX + this.$el.scrollLeft - elContainerBoundingBox.x - offset.x
const oy = event.clientY + this.$el.scrollTop - elContainerBoundingBox.y - offset.y
const x = Math.ceil(ox / this.gridDimensions.full.cell.width)
const y = Math.ceil(oy / this.gridDimensions.full.cell.height)
return {x: x, y: y, ox: ox, oy: oy}
return { x: x, y: y, ox: ox, oy: oy }
},
updateGridDimensions () {
let elWidth = this.$el.offsetWidth
......
......@@ -185,7 +185,7 @@
// TAGGING
else if (/^[\s]*#.+/.test(this.term)) {
const tag = this.term.replace(/^[\s]*#/, '').toLowerCase()
_this.$store.dispatch('annotations/find', {'body.purpose': 'tagging'})
_this.$store.dispatch('annotations/find', { 'body.purpose': 'tagging' })
.then(tagAnnotations => {
console.log(tagAnnotations)
let targetsMatched = {}
......@@ -214,7 +214,7 @@
results.push(res)
let body = ObjectUtil.merge({}, res.body)
body.type = 'text'
results.push({body})
results.push({ body })
}
this.results = results
}
......
......@@ -71,10 +71,10 @@
methods: {
getSignature () {
if (this.video) {
return {origin: this.video, type: 'Video'}
return { origin: this.video, type: 'Video' }
}
else {
return {origin: this.cell, type: '2DCell'}
return { origin: this.cell, type: '2DCell' }
}
},
handlePlayerReady (player) {
......
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