NUKnightLab / NUKnightLab/TimelineJS3

VCO.Timeline.add(data) doesn't draw time axis correctly

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
JavaScript
Stars
3.2k
Forks
645
PR merge metrics
No merged PRs in 30d

Description

In exploring the process of slide and marker instantiation (to understand what it would take to address #197) I manually tried adding a slide by copying the JSON data for a single event and calling timeline.add(data). It seemed to create the slide and marker correctly and position them correctly, but the axis ended up all bunched together.

Zooming in and out on the timenav eventually reset everything, so probably there just needs to be a call to reset the axis somewhere in https://github.com/NUKnightLab/TimelineJS3/blob/6da33b0f567502b0e4465428aac83dcb191abfe9/source/js/VCO.Timeline.js#L301-L314

Since direct manipulation of the timeline instance like this isn't a high priority feature, we might put this in 'future', but I also think that sorting this out might tighten up the code a lot, so part of me wants to set it in 'cutover'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in source/js/VCO.Timeline.js at lines 301-314 and reproduce the issue by copying one event's JSON and calling timeline.add(data). Compare the axis before and after zooming in and out to identify the missing reset step. Done means the time axis is laid out correctly immediately after adding the slide and marker, without requiring zoom interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.