Merge pull request #63 from ok2/codex/add-properties-to-control-event-visibility
This commit is contained in:
commit
456f0744c4
@ -10,6 +10,8 @@
|
|||||||
// 2 = every second unit, ...).
|
// 2 = every second unit, ...).
|
||||||
// label - short description displayed on the calendar.
|
// label - short description displayed on the calendar.
|
||||||
// duration - optional length of the event in seconds.
|
// duration - optional length of the event in seconds.
|
||||||
|
// showMega - optional boolean, show label on the megasequence view (default true).
|
||||||
|
// showDetail - optional boolean, show event in the detail view (default true).
|
||||||
|
|
||||||
window.SPECIAL_EVENTS = [
|
window.SPECIAL_EVENTS = [
|
||||||
{ start: '49f4.9332', label: 'Afina', unit: 'cosmocycle', interval: 1 },
|
{ start: '49f4.9332', label: 'Afina', unit: 'cosmocycle', interval: 1 },
|
||||||
@ -19,5 +21,5 @@ window.SPECIAL_EVENTS = [
|
|||||||
{ start: '330d.d4ae', label: 'Zusammentag', unit: 'cosmocycle', interval: 1 },
|
{ start: '330d.d4ae', label: 'Zusammentag', unit: 'cosmocycle', interval: 1 },
|
||||||
{ start: '11de.0c52', label: 'Anna', unit: 'cosmocycle', interval: 1 },
|
{ start: '11de.0c52', label: 'Anna', unit: 'cosmocycle', interval: 1 },
|
||||||
{ start: '467f.ae61', label: 'Iris', unit: 'cosmocycle', interval: 1 },
|
{ start: '467f.ae61', label: 'Iris', unit: 'cosmocycle', interval: 1 },
|
||||||
{ start: '6854.7a75', cobie: '6854.7a75', label: 'Sleep', unit: 'second', interval: 86400, duration: 28800 }
|
{ start: '6854.7a75', cobie: '6854.7a75', label: 'Sleep', unit: 'second', interval: 86400, duration: 28800, showMega: false }
|
||||||
];
|
];
|
||||||
|
|||||||
@ -605,6 +605,7 @@ function updateCalendar() {
|
|||||||
const cellStart = cellCob;
|
const cellStart = cellCob;
|
||||||
const cellEnd = cellCob + COBIE_UNITS.eonstrip;
|
const cellEnd = cellCob + COBIE_UNITS.eonstrip;
|
||||||
window.SPECIAL_EVENTS.forEach(ev => {
|
window.SPECIAL_EVENTS.forEach(ev => {
|
||||||
|
if (ev.showMega === false) return;
|
||||||
const startCob = parseCobiets(ev.start || ev.cobie);
|
const startCob = parseCobiets(ev.start || ev.cobie);
|
||||||
if (startCob === null) return;
|
if (startCob === null) return;
|
||||||
const endCob = ev.end ? parseCobiets(ev.end) : Number.POSITIVE_INFINITY;
|
const endCob = ev.end ? parseCobiets(ev.end) : Number.POSITIVE_INFINITY;
|
||||||
@ -705,6 +706,7 @@ function showEonstripDetail(index, startCob) {
|
|||||||
const start = startCob;
|
const start = startCob;
|
||||||
const end = startCob + COBIE_UNITS.eonstrip;
|
const end = startCob + COBIE_UNITS.eonstrip;
|
||||||
window.SPECIAL_EVENTS.forEach(ev => {
|
window.SPECIAL_EVENTS.forEach(ev => {
|
||||||
|
if (ev.showDetail === false) return;
|
||||||
const startCobEv = parseCobiets(ev.start || ev.cobie);
|
const startCobEv = parseCobiets(ev.start || ev.cobie);
|
||||||
if (startCobEv === null) return;
|
if (startCobEv === null) return;
|
||||||
const endCobEv = ev.end ? parseCobiets(ev.end) : Number.POSITIVE_INFINITY;
|
const endCobEv = ev.end ? parseCobiets(ev.end) : Number.POSITIVE_INFINITY;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user