Commit 5d44bf29 authored by christianrhansen's avatar christianrhansen
Browse files

more structure by comments

parent bc9ee312
Pipeline #20215 passed with stage
in 4 minutes and 17 seconds
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
@contextmenu="handleGridContextMenu", @contextmenu="handleGridContextMenu",
:style="gridStyle") :style="gridStyle")
// context menu grid (desktop only) //----- context menu grid (desktop only)
q-context-menu.desktop-only(ref="gridmenu") q-context-menu.desktop-only(ref="gridmenu")
q-list(link, separator, no-border, style="min-width: 150px; max-height: 300px;") q-list(link, separator, no-border, style="min-width: 150px; max-height: 300px;")
q-item( q-item(
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
template(v-if="!resizingGrid") template(v-if="!resizingGrid")
//--------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------- cell
template(v-for="(annotation, index) in annotations") template(v-for="(annotation, index) in annotations")
//----- cell
// v-touch-hold="event => {cellCopy(event, annotation)}", // v-touch-hold="event => {cellCopy(event, annotation)}",
.cell-item( .cell-item(
v-if="!annotationUIStates[annotation._uuid] || !annotationUIStates[annotation._uuid].beingDragged", v-if="!annotationUIStates[annotation._uuid] || !annotationUIStates[annotation._uuid].beingDragged",
...@@ -79,16 +79,14 @@ ...@@ -79,16 +79,14 @@
:class="getAnnotationClasses(annotation._uuid, 'cell-item')", :class="getAnnotationClasses(annotation._uuid, 'cell-item')",
:key="`cell-${index}`") :key="`cell-${index}`")
//--------------------------------------------------------------------------------------- edit-/close-button
// TODO: find a more elegant solution
//-------------------------------------------------------------------------------------------------- desktop //-------------------------------------------------------------------------------------------------- desktop
.desktop-only .desktop-only
q-btn.edit-button.absolute-top-right( q-btn.edit-button.absolute-top-right(
@click.prevent="event => {handleCellEditClick(event, annotation)}", @click.prevent="event => {handleCellEditClick(event, annotation)}",
:class="getAnnotationClasses(annotation._uuid, 'editing')", :class="getAnnotationClasses(annotation._uuid, 'editing')",
style="top: 8px; right: 8px;", style="top: 8px; right: 8px;",
:icon="annotationUIStates[annotation._uuid].editing ? 'close' : 'edit'", flat, round, size="md" :icon="annotationUIStates[annotation._uuid].editing ? 'close' : 'edit'", flat, round, size="md")
)
//--------------------------------------------------------------------------------------------------- mobile //--------------------------------------------------------------------------------------------------- mobile
.mobile-only .mobile-only
.edit-button.absolute.fit.bg-transparent( .edit-button.absolute.fit.bg-transparent(
...@@ -101,8 +99,7 @@ ...@@ -101,8 +99,7 @@
@click.native.prevent="event => {handleCellClick(event, annotation)}", :annotation="annotation", :preview="true") @click.native.prevent="event => {handleCellClick(event, annotation)}", :annotation="annotation", :preview="true")
cell( cell(
:annotation="annotation", :annotation="annotation",
:preview="true" :preview="true")
)
//----- resize-handler (desktop only) //----- resize-handler (desktop only)
.desktop-only.cell-item-resize-handle( .desktop-only.cell-item-resize-handle(
...@@ -123,12 +120,13 @@ ...@@ -123,12 +120,13 @@
@click.native="event => {action.handler(event, annotation)}") @click.native="event => {action.handler(event, annotation)}")
q-item-main(:label="action.label") q-item-main(:label="action.label")
//----- temporary cell when pulling a new cell into grid (desktop) //----------------------------------------------------------------------------------------------- temporary cell
//------------------------------------------------------------------------------------------------------ desktop
template(v-for="(tmpCell, index) in tmpObjects") template(v-for="(tmpCell, index) in tmpObjects")
.cell-item.cell-item-tmp(:style="getAnnotationStyle(tmpCell)", :key="`cell-tmp-${index}`") .cell-item.cell-item-tmp(:style="getAnnotationStyle(tmpCell)", :key="`cell-tmp-${index}`")
cell(:cell="tmpCell") cell(:cell="tmpCell")
//-------------------------------------------------------------------------------------- temporary cell (mobile) //------------------------------------------------------------------------------------------------------- mobile
template(v-if="mobileTempCell.show && cachedNewCell") template(v-if="mobileTempCell.show && cachedNewCell")
.cell-item.cell-item-tmp-mobile.row.justify-center.items-center( .cell-item.cell-item-tmp-mobile.row.justify-center.items-center(
......
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