mirror of
https://github.com/tenrok/vue-ganttastic.git
synced 2026-06-22 23:00:33 +03:00
Minor bug fix: bar-start and bar-end property of pushed overlapping bar is set to a date-formatted string instead of a moment object
This commit is contained in:
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-ganttastic",
|
||||
"version": "0.9.13",
|
||||
"version": "0.9.16",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-ganttastic",
|
||||
"version": "0.9.15",
|
||||
"version": "0.9.26",
|
||||
"description": "A simple and customizable Gantt chart component for Vue.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -32,5 +32,6 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"moment": "^2.26.0"
|
||||
}
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
||||
+2
-2
@@ -303,12 +303,12 @@ export default {
|
||||
case "left":
|
||||
minuteDiff = overlapEndMoment.diff(currentStartMoment, "minutes", true)
|
||||
overlapBar[this.barEnd] = currentBar[this.barStart]
|
||||
overlapBar[this.barStart] = overlapStartMoment.subtract(minuteDiff, "minutes", true)
|
||||
overlapBar[this.barStart] = overlapStartMoment.subtract(minuteDiff, "minutes", true).format("YYYY-MM-DD HH:mm:ss")
|
||||
break
|
||||
case "right":
|
||||
minuteDiff = currentEndMoment.diff(overlapStartMoment, "minutes", true)
|
||||
overlapBar[this.barStart] = currentBar[this.barEnd]
|
||||
overlapBar[this.barEnd] = overlapEndMoment.add(minuteDiff, "minutes", true)
|
||||
overlapBar[this.barEnd] = overlapEndMoment.add(minuteDiff, "minutes", true).format("YYYY-MM-DD HH:mm:ss")
|
||||
break
|
||||
default:
|
||||
console.warn("One bar is inside of the other one! This should never occur while push-on-overlap is active!")
|
||||
|
||||
+1
-1
@@ -224,7 +224,7 @@ export default {
|
||||
while(nextBar){
|
||||
let currentBarOffsetRight = currentBar.$refs['g-gantt-bar'].offsetLeft + currentBar.$refs['g-gantt-bar'].offsetWidth
|
||||
gapDistanceSoFar += nextBar.$refs['g-gantt-bar'].offsetLeft - currentBarOffsetRight
|
||||
if(nextBar.barConfig.immobile){
|
||||
if(nextBar.barConfig.immobile || (nextBar.barConfig.isShadow && !ignoreShadows)){
|
||||
return [gapDistanceSoFar, bundleBarsAndGapDist]
|
||||
} else if(nextBar.barConfig.bundle){
|
||||
bundleBarsAndGapDist.push({bar: nextBar, gapDistance: gapDistanceSoFar})
|
||||
|
||||
Reference in New Issue
Block a user