Skip to content

Timeband

Eric edited this page Nov 18, 2022 · 4 revisions

Timeband is a component that displays an infinite timeline. It uses Swapper

OML

 {"selector:Timeband":{CONFIG}}

Config

 {
     "date": DATE, 
     "cb_moved": OPTIONAL_CALLBACK, 
     "cb_moving": OPTIONAL_CALLBACK
 }

Methods

 my_timeband.pxPerDay();     //get pixels per day
 my_timeband.date(__date);   //sets or gets current date
 my_timeband.move(__days);   //Move by X days
 my_timeband.render();       //renders   
 my_timeband.zoomIn();       //zoom in
 my_timeband.zoomOut();      //zoom out

Callbacks

 my_timeband.onMove = function(){};
 my_timeband.onMoved = function(){};
 my_timeband.onRender = function(){};
Clone this wiki locally