From 78eb687dedf02f174133c36e96a1f179fe2e07d6 Mon Sep 17 00:00:00 2001 From: Steve Van Opstal Date: Thu, 15 Dec 2016 12:20:28 +0100 Subject: [PATCH] feat(items): add offset for non start items --- src/client/build/build.css | 8 ++++++++ src/client/build/items/item.component.ts | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/client/build/build.css b/src/client/build/build.css index 3701a20..4205e40 100644 --- a/src/client/build/build.css +++ b/src/client/build/build.css @@ -528,6 +528,14 @@ lb-items { height: 300px; } +lb-items:before { + background-color: #f3f3f3; + content: ''; + height: 300px; + position: absolute; + width: 52px; +} + lb-items lb-item { display: inline-block; position: relative; diff --git a/src/client/build/items/item.component.ts b/src/client/build/items/item.component.ts index f49fdb8..09dceeb 100644 --- a/src/client/build/items/item.component.ts +++ b/src/client/build/items/item.component.ts @@ -25,6 +25,9 @@ export class ItemComponent implements DoCheck { return; } let offset = this.xScaleTime.get()(this.item.time); + if (offset > 0) { + offset += 60; + } this.el.nativeElement.setAttribute('style', 'left: ' + offset + 'px'); this.itemPrev = this.item; }