X-Git-Url: http://average.org/gitweb/?a=blobdiff_plain;f=include%2Fshow.js;h=a614c344b378f4e173125ce566d3884949e0c9d1;hb=bf4ffba811821b98c05460149d8bf2d8cc807a29;hp=2b5264f4be9d54bf460adc16f45bb6bd2844b612;hpb=b55242bcbdfa5ab5bea3b3391cee28b79ce59762;p=mkgallery.git diff --git a/include/show.js b/include/show.js index 2b5264f..a614c34 100644 --- a/include/show.js +++ b/include/show.js @@ -30,6 +30,9 @@ - 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({ @@ -49,16 +52,15 @@ var Show = new Class({ this.controls.registershow(this); window.addEvent('resize', this.resizer.bind(this)) - window.addEvent('scroll', this.scroller.bind(this)) }, + /* event handler for window resize */ + resizer: function(){ alert('show.resizer called'); }, - scroller: function(){ - alert('show.scroller called'); - }, + /* prev, play, stop, next, exit, comm are methods for button presses */ prev: function(){ this.controls.info(-1,this.vimgs.length, @@ -82,20 +84,25 @@ var Show = new Class({ '','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'); + /* alert('show.comm called, do nothing'); */ }, + /* Entry point: called to start doing things */ + + start: function(id, play){ + this.options.cbStart(); + alert('starting at '+id+', play='+play); + /* real job here */ + return false; /* to make it usable from href links */ + }, + + /* "Private" methods to do the real job */ + }); Show.implement(new Options); Show.implement(new Events);