Carry the level everywhere a position is drawn, and gate it per occurrence
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<!-- With coordinates, the name carries the same floor-plan preview
|
||||
the asset's own page uses. Without them, a plain link. -->
|
||||
<LocationMapTooltip v-if="row.link && row.maphover"
|
||||
:left="row.maphover.x" :top="row.maphover.y"
|
||||
:left="row.maphover.x" :top="row.maphover.y" :levelid="row.maphover.levelid"
|
||||
:machineName="row.maphover.label">
|
||||
<router-link :to="row.link" class="dc-row-title"
|
||||
:title="row.titletip || undefined">
|
||||
|
||||
@@ -127,7 +127,15 @@ export function mapHover(card, item) {
|
||||
const x = item[spec.x]
|
||||
const y = item[spec.y]
|
||||
if (x === null || x === undefined || y === null || y === undefined) return null
|
||||
return { x, y, label: spec.label ? (item[spec.label] || '') : '' }
|
||||
// The level travels with the coordinates (ADR-017) - they are pixels of ONE
|
||||
// drawing. Read `levelid` unless the card names another field, so a card that
|
||||
// predates levels still previews on the right floor instead of none.
|
||||
const levelid = item[spec.level || 'levelid']
|
||||
return {
|
||||
x, y,
|
||||
levelid: levelid === undefined ? null : levelid,
|
||||
label: spec.label ? (item[spec.label] || '') : '',
|
||||
}
|
||||
}
|
||||
|
||||
export function cardRows(card) {
|
||||
|
||||
Reference in New Issue
Block a user