diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-28 16:04:43 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-28 16:04:43 +1100 |
| commit | 8687a7fafc1f200dad6eee9b5b7f3c7cdb2572a0 (patch) | |
| tree | e4328f981f5a6f933f6d650bd86227a6a23e85f5 | |
| parent | 873b11ba2c799c41301722187b2519e64147d495 (diff) | |
Prevent timeline height becoming negative
| -rw-r--r-- | src/App.vue | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue index 9dcb08b..bfd2730 100644 --- a/src/App.vue +++ b/src/App.vue @@ -106,7 +106,7 @@ const timelineWidth = computed(() => { }); const timelineHeight = computed(() => { let baseLineHeight = (store.showBaseLine && !vert.value) ? store.baseLineBreadth : 0; - return (contentHeight.value - baseLineHeight) / (vert.value ? 1 : timelines.value.length); + return Math.max(1, contentHeight.value - baseLineHeight) / (vert.value ? 1 : timelines.value.length); }); function updateAreaDims(){ |
