aboutsummaryrefslogtreecommitdiff
path: root/src/components/TimeLine.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-12-18 20:47:12 +1100
committerTerry Truong <terry06890@gmail.com>2022-12-18 20:47:12 +1100
commit5db4ecc36e7409dcb1a91879ed6510bc74f6caa4 (patch)
tree7a0b3301f0b3822214a44826427892199863527d /src/components/TimeLine.vue
parentfac881d61176f04a4062db710df98924a76b0ffb (diff)
Only show close button for multiple timelines
Change close icon from '-' to 'x'
Diffstat (limited to 'src/components/TimeLine.vue')
-rw-r--r--src/components/TimeLine.vue7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index fd119be..7d37ca8 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -48,10 +48,10 @@
</div>
</div>
<!-- Buttons -->
- <icon-button :size="30" class="absolute top-2 right-2"
+ <icon-button v-if="closeable" :size="30" class="absolute top-2 right-2"
:style="{color: store.color.text, backgroundColor: store.color.altDark2}"
@click="emit('remove')" title="Remove timeline">
- <minus-icon/>
+ <close-icon/>
</icon-button>
</div>
</template>
@@ -61,7 +61,7 @@ import {ref, onMounted, computed, watch, watchEffect, PropType, Ref, shallowRef,
// Components
import IconButton from './IconButton.vue';
// Icons
-import MinusIcon from './icon/MinusIcon.vue';
+import CloseIcon from './icon/CloseIcon.vue';
// Other
import {WRITING_MODE_HORZ, MIN_DATE, MAX_DATE, MONTH_SCALE, DAY_SCALE, SCALES,
MIN_CAL_YEAR, HistDate, CalDate, stepDate, inDateScale, getScaleRatio, getUnitDiff, getDaysInMonth,
@@ -78,6 +78,7 @@ const store = useStore();
// Props + events
const props = defineProps({
vert: {type: Boolean, required: true},
+ closeable: {type: Boolean, default: true},
initialState: {type: Object as PropType<TimelineState>, required: true},
eventTree: {type: Object as PropType<RBTree<HistEvent>>, required: true},
});