diff --git a/package-lock.json b/package-lock.json index f3046fd..71c1d7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3194,6 +3194,11 @@ "minimist": "^1.2.5" } }, + "moment": { + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", + "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", diff --git a/package.json b/package.json index 6ee1389..19def34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-ganttastic", - "version": "0.9.18", + "version": "0.9.19", "description": "A simple and customizable Gantt chart component for Vue.js", "repository": { "type": "git", @@ -33,5 +33,7 @@ "peerDependencies": { "moment": "^2.26.0" }, - "dependencies": {} + "dependencies": { + "moment": "^2.27.0" + } } diff --git a/src/GGanttBar.vue b/src/GGanttBar.vue index e2e2cd2..df72686 100644 --- a/src/GGanttBar.vue +++ b/src/GGanttBar.vue @@ -124,8 +124,8 @@ export default { ...(this.barConfig || {}), left: `${xStart}px`, width: `${xEnd - xStart}px`, - height: `${this.ganttChartProps.rowHeight-6}px`, - zIndex: this.isDragging ? 2 : 1 + height: `${this.ganttChartProps.rowHeight - 6}px`, + zIndex: this.barConfig.zIndex || (this.isDragging ? 2 : 1) } }, diff --git a/src/Playground.vue b/src/Playground.vue index 8a5999d..0551753 100644 --- a/src/Playground.vue +++ b/src/Playground.vue @@ -134,7 +134,7 @@ export default { myStart: "2020-03-02 01:00", myEnd: "2020-03-02 07:00", label: "Bar", - ganttBarConfig: {color:"white", backgroundColor: "#5effad", pushOnOverlap: false} + ganttBarConfig: {color:"white", backgroundColor: "#5effad", pushOnOverlap: false, zIndex: 3} }, { myStart: "2020-03-03 14:00",