remove vertical connector lines
This commit is contained in:
@@ -674,14 +674,7 @@
|
|||||||
position: absolute; top: 16px; bottom: 0;
|
position: absolute; top: 16px; bottom: 0;
|
||||||
z-index: 2; cursor: crosshair; background: transparent;
|
z-index: 2; cursor: crosshair; background: transparent;
|
||||||
}
|
}
|
||||||
.tl-connector {
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
border-left: 1px dashed rgba(232,220,196,.22);
|
|
||||||
transform: translateX(-50%);
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-events {
|
.project-events {
|
||||||
margin-top:.8rem; padding-top:.8rem; border-top:1px solid var(--line);
|
margin-top:.8rem; padding-top:.8rem; border-top:1px solid var(--line);
|
||||||
@@ -899,7 +892,7 @@
|
|||||||
<template x-for="ev in eventsForProject(item.id)" :key="ev.id">
|
<template x-for="ev in eventsForProject(item.id)" :key="ev.id">
|
||||||
<a class="tl-project-evt-dot"
|
<a class="tl-project-evt-dot"
|
||||||
:class="ev.mood || (game && game.mood) || 'light'"
|
:class="ev.mood || (game && game.mood) || 'light'"
|
||||||
:style="`left:${spreadPct(ev.id, ev.date)}%`"
|
:style="`left:${posPercent(ev.date)}%`"
|
||||||
:href="'#entry-' + ev.id"
|
:href="'#entry-' + ev.id"
|
||||||
:title="ev.title + ' — ' + ev.date"
|
:title="ev.title + ' — ' + ev.date"
|
||||||
@click.stop></a>
|
@click.stop></a>
|
||||||
@@ -930,12 +923,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Vertical connectors: main rail → project pin -->
|
|
||||||
<template x-for="line in projectConnectors()" :key="line.id">
|
|
||||||
<div class="tl-connector"
|
|
||||||
:style="`left:${line.pct}%;top:${line.top}px;height:${line.height}px`">
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div><!-- /.tl-wrap -->
|
</div><!-- /.tl-wrap -->
|
||||||
</div>
|
</div>
|
||||||
@@ -2146,32 +2133,6 @@
|
|||||||
return result.sort((a, b) => a.term.localeCompare(b.term))
|
return result.sort((a, b) => a.term.localeCompare(b.term))
|
||||||
},
|
},
|
||||||
|
|
||||||
// Spread pct: use the adjusted position from tlItems so connectors/pins
|
|
||||||
// align with the main-rail callout dot (which gets nudged to avoid overlap).
|
|
||||||
spreadPct(evId, fallbackDate) {
|
|
||||||
const item = this.tlItems.find(i => i.id === evId)
|
|
||||||
return item ? item.pct : this.posPercent(fallbackDate)
|
|
||||||
},
|
|
||||||
|
|
||||||
// Vertical connector lines from main-rail event dots down to project pins.
|
|
||||||
projectConnectors() {
|
|
||||||
if (!this.game) return []
|
|
||||||
const projs = this.projects()
|
|
||||||
if (!projs.length) return []
|
|
||||||
const SUBLABEL_H = 32, ROW_H = 36, PIN_LEVEL = 7
|
|
||||||
return this.events()
|
|
||||||
.filter(ev => ev.project_id)
|
|
||||||
.map(ev => {
|
|
||||||
const idx = projs.findIndex(p => p.id === ev.project_id)
|
|
||||||
if (idx === -1) return null
|
|
||||||
const pct = this.spreadPct(ev.id, ev.date)
|
|
||||||
const topY = this.tlRailY()
|
|
||||||
const pinY = this.tlHeight() + SUBLABEL_H + idx * ROW_H + PIN_LEVEL
|
|
||||||
return { id: ev.id, pct, top: topY, height: Math.max(0, pinY - topY) }
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
},
|
|
||||||
|
|
||||||
openAddEventToProject(project, clickEvent) {
|
openAddEventToProject(project, clickEvent) {
|
||||||
const env = this.randomEnv(project.discipline)
|
const env = this.randomEnv(project.discipline)
|
||||||
this.activeForm = {
|
this.activeForm = {
|
||||||
|
|||||||
Reference in New Issue
Block a user