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

Timestamp is not shown at first #36

Open
hashemian opened this issue Oct 7, 2015 · 3 comments
Open

Timestamp is not shown at first #36

hashemian opened this issue Oct 7, 2015 · 3 comments

Comments

@hashemian
Copy link

Hi there

When you set showAllOnStart and alwaysShowDate, at the beginning the timestamp is not shown under the slider, until the slider is moved for the first time. This is because at the beginning, setting the timestamp is through the following code:

if (!_options.range && _options.alwaysShowDate) {
    $('#slider-timestamp').html(_extractTimeStamp(_options.markers[index_start].feature.properties[_options.timeAttribute], _options));
}

And this code does not consider the cases where markers don't have feature, unlike the code which is responsible for showing the timestamp when the slider is moved.

To fix this, I simply had to move the code used to set the timestamp in the slide function into a separate function, and then call it both from inside of the if statement above, and also from inside the slide function, and that fixed the issue, but I could not upload a patch/pull request for this issue.

Any idea how I can get this fixed? In case someone else wants to use this as well in future?

Cheers,
M.

@dwilhelm89
Copy link
Owner

Why couldn't you upload a patch?

@imlearningr
Copy link

Thank you very much! I would like to fix it on my map as well but I am not savvy enough with coding to fix it myself with your instruction. Please upload a patch.

@milas991
Copy link

milas991 commented Feb 3, 2019

Hi, did anybody fix this?

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

4 participants