Commit d459e9dd authored by christianrhansen's avatar christianrhansen

removed redundant function (mobileTempCellStyle)

parent 94f13e9a
Pipeline #20283 passed with stage
in 1 minute and 24 seconds
......@@ -130,7 +130,7 @@
//------------------------------------------------------------------------------------------------------- mobile
template(v-if="mobileTempCell.show && cachedNewCell")
.cell-item.cell-item-tmp-mobile(:style="mobileTempCellStyle(mobileTempCell)")
.cell-item.cell-item-tmp-mobile(:style="getCellStyle(mobileTempCell)")
//------------------------------------------------------------------------------------------------------ handler
//--------------------------------------------------------------------------------------------------------- move
......@@ -1046,21 +1046,29 @@
}
}
},
mobileTempCellStyle (obj) {
return {
'grid-column-start': obj.x,
'grid-column-end': `span ${obj.width}`,
'grid-row-start': obj.y,
'grid-row-end': `span ${obj.height}`
getCellStyle (obj) {
let x, y, w, h
// ----- existing cell
if (obj.id) {
const parsed = obj.target.selector.parse()
x = parsed.xywh[0]
y = parsed.xywh[1]
w = parsed.xywh[2]
h = parsed.xywh[3]
}
// ----- temp cell
else {
x = obj.x
y = obj.y
w = obj.width
h = obj.height
}
},
getCellStyle (annotation) {
const parsed = annotation.target.selector.parse()
return {
'grid-column-start': parsed.xywh[0],
'grid-column-end': `span ${parsed.xywh[2]}`,
'grid-row-start': parsed.xywh[1],
'grid-row-end': `span ${parsed.xywh[3]}`
'grid-column-start': x,
'grid-column-end': `span ${w}`,
'grid-row-start': y,
'grid-row-end': `span ${h}`
}
},
getAnnotationClasses (uuid, which) {
......
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