Skip to content

Commit

Permalink
Fix: bars with a falsy bundle-ID are not affected
Browse files Browse the repository at this point in the history
by push-on-overlap anymore
Minor cleanup: added unicode-character for en-dash  to indicate date range in bar tooltip
Bumped version to 2.1.3
  • Loading branch information
zunnzunn committed Nov 26, 2022
1 parent 8ffd6f6 commit 01a0545
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@infectoone/vue-ganttastic",
"version": "2.1.2",
"version": "2.1.3",
"description": "A simple and customizable Gantt chart component for Vue.js",
"author": "Marko Zunic (@infectoone)",
"scripts": {
Expand Down
5 changes: 1 addition & 4 deletions src/components/GGanttBarTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ const tooltipContent = computed(() => {
}
const barStartFormatted = toDayjs(bar.value, "start").format(format)
const barEndFormatted = toDayjs(bar.value, "end").format(format)
// NOTE: this is not the HYPHEN-MINUS (-) character by intend.
// Instead we use the correct typographic sign the en-dash
// see: https://en.wikipedia.org/wiki/Dash#Ranges_of_values
return `${barStartFormatted} – ${barEndFormatted}`
return `${barStartFormatted} \u2013 ${barEndFormatted}`
})
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/composables/useBarDragManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default function useBarDragManagement() {
direction: "left" | "right"
) => {
addBarToMovedBars(pushedBar)
if (pushedBar.ganttBarConfig.bundle) {
if (!pushedBar.ganttBarConfig.bundle) {
return
}
getChartRows().forEach((row) => {
Expand Down

0 comments on commit 01a0545

Please sign in to comment.