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:
Generated
+933
-933
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -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
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user