Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The feature has been added in release 2.3.1. #111

Open
L-ZJoker opened this issue May 6, 2024 · 5 comments
Open

The feature has been added in release 2.3.1. #111

L-ZJoker opened this issue May 6, 2024 · 5 comments

Comments

@L-ZJoker
Copy link

L-ZJoker commented May 6, 2024

          The feature has been added in release 2.3.1.

Originally posted by @zunnzunn in #92 (comment)

@L-ZJoker
Copy link
Author

L-ZJoker commented May 6, 2024

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

@Pedrocanoas
Copy link
Contributor

you say the moment marker should move dynamically over time?

@L-ZJoker
Copy link
Author

you say the moment marker should move dynamically over time?

yes

@Pedrocanoas
Copy link
Contributor

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

@L-ZJoker
Copy link
Author

L-ZJoker commented May 11, 2024

currentMoment

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

#114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants