2
0
mirror of https://github.com/tenrok/vue-ganttastic.git synced 2026-06-19 23:40:33 +03:00

New gantt bar config property: pushOnOverlap

If explicitly set to false while g-gantt-chart's pushOnOverlap is true, pushing behavior will be ignored for the bar where it's specified
This commit is contained in:
zunicma
2020-07-02 10:03:29 +02:00
parent 4cfec09f88
commit 15c26865c0
4 changed files with 937 additions and 937 deletions
+933 -933
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vue-ganttastic",
"version": "0.9.15",
"version": "0.9.16",
"description": "A simple and customizable Gantt chart component for Vue.js",
"repository": {
"type": "git",
+2 -2
View File
@@ -288,7 +288,7 @@ export default {
},
manageOverlapping(){
if(!this.ganttChartProps.pushOnOverlap){
if(!this.ganttChartProps.pushOnOverlap || this.barConfig.pushOnOverlap === false){
return
}
let currentBar = this.bar
@@ -325,7 +325,7 @@ export default {
let barEndMoment = moment(bar[this.barEnd])
let overlapLeft, overlapRight, overlapInBetween
let overlapBar = this.allBarsInRow.find(otherBar => {
if(otherBar === bar){
if(otherBar === bar || otherBar.ganttBarConfig.pushOnOverlap === false){
return false
}
let otherBarStart = moment(otherBar[this.barStart])
+1 -1
View File
@@ -128,7 +128,7 @@ export default {
},
shouldSnapBackBar(ganttBar){
if(this.snapBackOnOverlap){
if(this.snapBackOnOverlap && ganttBar.barConfig.pushOnOverlap !== false){
let {overlapBar} = ganttBar.getOverlapBarAndType(ganttBar.bar)
return !!overlapBar
}