X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=include%2Fshow.js;h=a5f2abd5ddea8a5ac0e09e70f800416f76a767b3;hp=066485c88cb597534ac27ce26ce77e942384ff8e;hb=5c58dbcff6c07d9649f124874574f9c0a91b29ac;hpb=af2f2275168124e103af685035fafdc0755d45be;ds=sidebyside diff --git a/include/show.js b/include/show.js index 066485c..a5f2abd 100644 --- a/include/show.js +++ b/include/show.js @@ -30,13 +30,17 @@ - On "stop": if "playing" cancel autoswitch; break "playing". - On "start show": set up things; set "playing" state; show needed image. - On "stop show": cancel any schedules, hide things. + - On resize: recalculate existing image size and position; determine + what image is needed; if it is not the one on display then request + "show image" for the new image. */ var Show = new Class({ getOptions: function(){ return { - onClick: $empty, + cbStart: function(){ alert('show start undefined'); }, + cbExit: function(){ alert('show exit undefined'); }, } }, @@ -59,6 +63,43 @@ var Show = new Class({ alert('show.scroller called'); }, + prev: function(){ + this.controls.info(-1,this.vimgs.length, + '','prev called'); + }, + + stop: function(){ + this.controls.info(0,this.vimgs.length, + '','stop called'); + this.controls.running(0); + }, + + play: function(){ + this.controls.info(999,this.vimgs.length, + '','play called'); + this.controls.running(1); + }, + + next: function(){ + this.controls.info(1,this.vimgs.length, + '','next called'); + }, + + start: function(id, play){ + this.options.cbStart(); + /* real job here */ + return false; /* tao make it usable from href links */ + }, + + exit: function(){ + this.options.cbExit(); + }, + + comm: function(){ + alert('show.comm called, do nothing'); + }, + }); Show.implement(new Options); +Show.implement(new Events);