diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-10-10 14:07:07 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-10-10 14:07:07 +1100 |
| commit | 615003d0fac866f3d2fe0486e140019c95cd8068 (patch) | |
| tree | e9f0331dea99711f2972020c6bbc113b47749a39 /src/App.vue | |
| parent | edb9ac85069986d815f135eced347304bb81a63f (diff) | |
Make TimeLine track own sizing
Diffstat (limited to 'src/App.vue')
| -rw-r--r-- | src/App.vue | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/App.vue b/src/App.vue index cfd9084..3d63d21 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,18 +16,9 @@ </icon-button> </div> <!-- Content area --> - <div class="grow min-h-0 bg-stone-800 relative" ref="contentAreaRef"> + <div class="grow min-h-0 bg-stone-800 flex" :class="{'flex-col': !vert}" ref="contentAreaRef"> <time-line v-for="(data, idx) in timelineData" :key="data" - :style="{ - position: 'absolute', - top: (vert ? 0 : idx * contentHeight / timelineData.length) + 'px', - left: (vert ? idx * contentWidth / timelineData.length : 0) + 'px', - outline: 'black solid 1px', - }" - :width="vert ? contentWidth / timelineData.length : contentWidth" - :height="vert ? contentHeight : contentHeight / timelineData.length" - :vert="vert" - @close="onTimelineClose(idx)"/> + class="grow basis-full min-h-0 outline outline-1" :vert="vert" @close="onTimelineClose(idx)"/> </div> </div> </template> |
