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 @@ ...@@ -130,7 +130,7 @@
//------------------------------------------------------------------------------------------------------- mobile //------------------------------------------------------------------------------------------------------- mobile
template(v-if="mobileTempCell.show && cachedNewCell") 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 //------------------------------------------------------------------------------------------------------ handler
//--------------------------------------------------------------------------------------------------------- move //--------------------------------------------------------------------------------------------------------- move
...@@ -1046,21 +1046,29 @@ ...@@ -1046,21 +1046,29 @@
} }
} }
}, },
mobileTempCellStyle (obj) { getCellStyle (obj) {
return { let x, y, w, h
'grid-column-start': obj.x,
'grid-column-end': `span ${obj.width}`, // ----- existing cell
'grid-row-start': obj.y, if (obj.id) {
'grid-row-end': `span ${obj.height}` 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 { return {
'grid-column-start': parsed.xywh[0], 'grid-column-start': x,
'grid-column-end': `span ${parsed.xywh[2]}`, 'grid-column-end': `span ${w}`,
'grid-row-start': parsed.xywh[1], 'grid-row-start': y,
'grid-row-end': `span ${parsed.xywh[3]}` 'grid-row-end': `span ${h}`
} }
}, },
getAnnotationClasses (uuid, which) { 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