vue-ganttastic icon indicating copy to clipboard operation
vue-ganttastic copied to clipboard

The feature has been added in release 2.3.1.

Open L-ZJoker opened this issue 9 months ago • 5 comments

          The feature has been added in release 2.3.1.

Originally posted by @zunnzunn in https://github.com/zunnzunn/vue-ganttastic/issues/92#issuecomment-2008139894

L-ZJoker avatar May 06 '24 08:05 L-ZJoker

current-time is static, I think it should be real-time

L-ZJoker avatar May 06 '24 08:05 L-ZJoker

you say the moment marker should move dynamically over time?

Pedrocanoas avatar May 06 '24 13:05 Pedrocanoas

you say the moment marker should move dynamically over time?

yes

L-ZJoker avatar May 10 '24 06:05 L-ZJoker

I tried this on the feature and hoped it would work like that, but apparently, that's not what happened.

const xDist = computed(() => {
  const format = dateFormat.value || "YYYY-MM-DD HH:mm"
  return mapTimeToPosition(dayjs(currentMoment.value, format).format(format))
})

I ran some tests and could only achieve it using the set interval function, and I don't think it's the right way because it can decrease efficiency and processing power.

const xDist = setInterval(() => {
  const format = dateFormat.value || "YYYY-MM-DD HH:mm"
  return mapTimeToPosition(dayjs(currentMoment.value, format).format(format))
}, 1)

I leave it open here for future improvements for anyone who wants to venture, in my case, my knowledge was limited to this haha

Pedrocanoas avatar May 10 '24 11:05 Pedrocanoas

currentMoment

I created a PR, can you see if this solution is feasible?

https://github.com/zunnzunn/vue-ganttastic/pull/114

L-ZJoker avatar May 11 '24 03:05 L-ZJoker