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

Refactor the Timeline to meet coding standards. #754

Closed
3 tasks
mramato opened this issue May 9, 2013 · 12 comments
Closed
3 tasks

Refactor the Timeline to meet coding standards. #754

mramato opened this issue May 9, 2013 · 12 comments

Comments

@mramato
Copy link
Contributor

mramato commented May 9, 2013

The Timeline widget is awesome and people love it; however, it's some of the oldest UI code in Cesium and is radically different than the rest of the code base. We need to bring it up to snuff so that it meets our coding standards. There are also additional features we would like to add but cannot do so until we have a way to validate and

  • - Refactor to use Knockout and view models and meet general coding standards.
  • - Document the API (there is currently no entry at all in the built Documentation)
  • - Add specs (we currently don't have any)]

Related issues: #773, #1768, #2066, #3555

mramato added a commit that referenced this issue Jun 18, 2013
1. Properly implement Timeline destroy to make sure everyting cleans up after itself
2. Add a sanity check spec that creates/destroys the Timeline as a stopgap until we write complete specs.
3. Fix a bug introduced in #870 that caused the Timeline to not redraw properly on scroll/zoom.

This change does not attempt to fix the myriad of other issues with the Timeline, so please don't review it with our normal rigor.  I'm hoping to carve out some time soon to finally get around to #754.
@pjcozzi pjcozzi added the 1.0 label May 8, 2014
@mramato
Copy link
Contributor Author

mramato commented Jul 14, 2014

What's the plan here? We obviously don't have enough time for a full re-write before 1.0; but should we just pretty up what we have with knockout and documentation? Or do we just keep what we have and have a breaking change isolated to Timeline when we do the rewrite?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 18, 2014

I'm open to anything, but perhaps we push the whole thing unless @emackey has time to do knockout/doc before 1.0.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 22, 2014

Any update? Are we pushing this?

@mramato
Copy link
Contributor Author

mramato commented Jul 22, 2014

I think the consensus is to push it and just make it a full-on breaking change later; however we should probably add at least basic doc stating as much. I'll take a stab at it tomorrow and push this after I open the pull.

mramato added a commit that referenced this issue Jul 25, 2014
While the Timeline will be completely re-written in the future, we should have at least minor doc for 1.0 (though most things have been marked private).

CC #754
@mramato
Copy link
Contributor Author

mramato commented Jul 25, 2014

I opened the above PR with very basic doc; but otherwise I'm moving this to push.

@mramato mramato added 1.0 push and removed 1.0 labels Jul 25, 2014
@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 25, 2014

+1

@mramato
Copy link
Contributor Author

mramato commented Apr 20, 2015

Some discussion on the fourm

@WarpDrive
Copy link

Thanks Matt. There's also an issue with mousewheel: when you can scroll the page Cesium is on, you can't mousewheel the timeline because the page scrolling moves the timeline away from the pointer, and the pointer needs to be hovering over the element to register mousewheel (for keyboard events only focus is needed, not hover over.) So when the timeline is hovered over page scrolling should be disabled (which seems to already be the case for the 3D canvas.)

@td-edge
Copy link

td-edge commented Sep 1, 2015

+1

A standalone application would be ideal...

@hpinkos
Copy link
Contributor

hpinkos commented Nov 12, 2015

idea from the forum: add a way to select the current date/time by typing it in or pick from a calendar instead of having to use the slider

@td-edge
Copy link

td-edge commented Nov 17, 2015

@hpinkos I had the same issue and used bootstrap's datepicker to create a solution:

var start_julian = clock.startTime;
var end_julian = clock.stopTime;

$("#start-datepicker").datepicker({
    onSelect: function(dateText, inst) {
        var dateAsObject = $(this).datepicker( 'getDate' ); //the getDate method
        start_julian = new Cesium.JulianDate.fromDate(dateAsObject);
        clock.startTime = start_julian;
        clock.currentTime = start_julian;
        timeline.zoomTo(start_julian, end_julian);
    }
});

$("#end-datepicker").datepicker({
    onSelect: function(dateText, inst) {
        var dateAsObject = $(this).datepicker( 'getDate' ); //the getDate method
        end_julian = new Cesium.JulianDate.fromDate(dateAsObject);
        clock.stopTime = end_julian;
        timeline.zoomTo(start_julian, end_julian);
    }
});
@jjhembd
Copy link
Contributor

jjhembd commented Apr 13, 2023

This is unlikely to be a priority anytime soon. If someone does want to address it, something along the lines of #10876 would be more in line with current coding standards.
Tracking this isn't particularly useful because of its low priority, so I will close it.
Thanks!

@jjhembd jjhembd closed this as completed Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment