Frerit / epiclock

Automatically exported from code.google.com/p/epiclock
0 stars 0 forks source link

Improve clock creator #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Right now, as of v0.01, the epiClock takes strings of arguments, which is not 
elegant, or efficient, or 
the way the project should work. With the next rollout, we're going to move to 
an object based 
parameter system, so instead of:

epiClock.make('element_id','clock_mode','clock_view','clock_format',...);

you'll call

epiClock.make(element,{mode: 'CUR', view: 'FLIP', target: '10/10/2010 10:10 
PM"});

or, conversely, you will have an autoloader function, defined through the 
object:

<div id="clock1" class="epiClock" display="mode: 'CUR'; view: 'FLIP';"></div>

Original issue reported on code.google.com by gars...@gmail.com on 15 Mar 2008 at 3:38

GoogleCodeExporter commented 9 years ago
I've redone the system's creation routines, so instead of calling 
epiClock.make() and epiClock.preLoad(), the 
sequence for the next milestone will be:

epiClock.set('id',{param: 'value', param: 'value'});

or, for multiple clocks:

epiClock.set({id: 'ID', param: 'value'},{id: 'ID2', param: 'value'});

with an alternative syntax for multiple clocks with:

epiClock.set('id',{param1:'value'},'id2',{'param2:'value'});

If using the alternative syntax, however, be sure that you pass your params 
ALWAYS in the fashion: 
'id',{params},  'id',{params}

Original comment by gars...@gmail.com on 15 Mar 2008 at 4:23