mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
added fullId to v-for loops for safety of rendering and default unique IDs value to fullId in model; researched and tested showing multiple collections on same timeline;
This commit is contained in:
parent
718112884f
commit
aae96b57bb
@ -19,14 +19,14 @@
|
|||||||
<div class="scroll" ref="periodScroll" :class="{highlight: highlight}">
|
<div class="scroll" ref="periodScroll" :class="{highlight: highlight}">
|
||||||
<div class="periods" ref="periods">
|
<div class="periods" ref="periods">
|
||||||
<div v-for="subPeriod in period.children"
|
<div v-for="subPeriod in period.children"
|
||||||
:key="subPeriod.id"
|
:key="subPeriod.fullId"
|
||||||
class="period"
|
class="period"
|
||||||
:class="{empty: !subPeriod.snapshotCount, highlight: highlightPeriod === subPeriod, 'last-level': !canZoom, 'contains-current-snapshot': containsCurrentSnapshot(subPeriod) }"
|
:class="{empty: !subPeriod.snapshotCount, highlight: highlightPeriod === subPeriod, 'last-level': !canZoom, 'contains-current-snapshot': containsCurrentSnapshot(subPeriod) }"
|
||||||
>
|
>
|
||||||
<div class="histo">
|
<div class="histo">
|
||||||
<div class="line"
|
<div class="line"
|
||||||
v-for="histoPeriod in subPeriod.children"
|
v-for="histoPeriod in subPeriod.children"
|
||||||
:key="histoPeriod.id"
|
:key="histoPeriod.fullId"
|
||||||
:style="{height: getHistoLineHeight(histoPeriod.snapshotCount)}"
|
:style="{height: getHistoLineHeight(histoPeriod.snapshotCount)}"
|
||||||
:class="{'has-single-snapshot': histoPeriod.snapshotCount === 1, 'contains-current-snapshot': containsCurrentSnapshot(histoPeriod)}"
|
:class="{'has-single-snapshot': histoPeriod.snapshotCount === 1, 'contains-current-snapshot': containsCurrentSnapshot(histoPeriod)}"
|
||||||
@click="changePeriod(histoPeriod, $event)"
|
@click="changePeriod(histoPeriod, $event)"
|
||||||
|
@ -140,7 +140,7 @@ export class PywbSnapshot {
|
|||||||
export function PywbPeriod(init) {
|
export function PywbPeriod(init) {
|
||||||
this.type = init.type;
|
this.type = init.type;
|
||||||
this.id = init.id;
|
this.id = init.id;
|
||||||
this.fullId = ''; // full-id property that include string id of parents and self with a delimitor
|
this.fullId = Math.floor(1000*1000+Math.random()*9*1000*1000).toString(16); // full-id property that include string id of parents and self with a delimitor
|
||||||
|
|
||||||
this.childrenIds = {}; // allow for query by ID
|
this.childrenIds = {}; // allow for query by ID
|
||||||
this.children = []; // allow for sequentiality / order
|
this.children = []; // allow for sequentiality / order
|
||||||
|
Loading…
x
Reference in New Issue
Block a user