2
0
mirror of https://github.com/tenrok/vue-ganttastic.git synced 2026-06-24 22:40:34 +03:00

Fix: bars with pushOnOverlap: false not considered when computing drag limits

This commit is contained in:
zunicma
2020-07-02 16:00:15 +02:00
parent 75cefb398d
commit 8e76a5974f
3 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "vue-ganttastic", "name": "vue-ganttastic",
"version": "0.9.21", "version": "0.9.23",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
+3 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "vue-ganttastic", "name": "vue-ganttastic",
"version": "0.9.21", "version": "0.9.23",
"description": "A simple and customizable Gantt chart component for Vue.js", "description": "A simple and customizable Gantt chart component for Vue.js",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -32,5 +32,6 @@
}, },
"peerDependencies": { "peerDependencies": {
"moment": "^2.26.0" "moment": "^2.26.0"
} },
"dependencies": {}
} }
+5 -3
View File
@@ -241,9 +241,10 @@ export default {
if(side === "left"){ if(side === "left"){
allBarsLeftOrRight = bar.$parent.$children.filter(gBar => { allBarsLeftOrRight = bar.$parent.$children.filter(gBar => {
return gBar.$options.name === GGanttBar.name return gBar.$options.name === GGanttBar.name
&& gBar.$parent === bar.$parent && gBar.$parent === bar.$parent
&& gBar.$refs['g-gantt-bar'] && gBar.$refs['g-gantt-bar']
&& gBar.$refs['g-gantt-bar'].offsetLeft < bar.$refs['g-gantt-bar'].offsetLeft && gBar.$refs['g-gantt-bar'].offsetLeft < bar.$refs['g-gantt-bar'].offsetLeft
&& gBar.barConfig.pushOnOverlap !== false
}) })
} else { } else {
allBarsLeftOrRight = bar.$parent.$children.filter(gBar => { allBarsLeftOrRight = bar.$parent.$children.filter(gBar => {
@@ -251,6 +252,7 @@ export default {
&& gBar.$parent === bar.$parent && gBar.$parent === bar.$parent
&& gBar.$refs['g-gantt-bar'] && gBar.$refs['g-gantt-bar']
&& gBar.$refs['g-gantt-bar'].offsetLeft > bar.$refs['g-gantt-bar'].offsetLeft && gBar.$refs['g-gantt-bar'].offsetLeft > bar.$refs['g-gantt-bar'].offsetLeft
&& gBar.barConfig.pushOnOverlap !== false
}) })
} }
if(allBarsLeftOrRight.length > 0){ if(allBarsLeftOrRight.length > 0){