mirror of
https://github.com/tenrok/vue-ganttastic.git
synced 2026-06-18 20:40:33 +03:00
Update lib/components/GGanttRow.vue
Co-authored-by: Diego Galeano <diegood@users.noreply.github.com>
This commit is contained in:
@@ -159,11 +159,11 @@ export default {
|
||||
},
|
||||
|
||||
onDrop(e) {
|
||||
let barContainer = this.$refs.barContainer.getBoundingClientRect()
|
||||
let xPos = e.clientX - barContainer.left
|
||||
let timeDiffFromStart = (xPos / barContainer.width) * this.timeCount
|
||||
let time = moment(this.chartStart).add(timeDiffFromStart, this.timeUnit)
|
||||
let bar = this.localBars.find(bar =>
|
||||
const barContainer = this.$refs.barContainer.getBoundingClientRect()
|
||||
const xPos = e.clientX - barContainer.left
|
||||
const timeDiffFromStart = (xPos / barContainer.width) * this.timeCount
|
||||
const time = moment(this.chartStart).add(timeDiffFromStart, this.timeUnit)
|
||||
const bar = this.localBars.find(bar =>
|
||||
time.isBetween(
|
||||
bar[this.chartProps.barStartKey],
|
||||
bar[this.chartProps.barEndKey]
|
||||
|
||||
Reference in New Issue
Block a user