Ticket #836 (closed enhancement: fixed)
[patch][cla] SlideShowBanner (new widget)
| Reported by: | tk | Owned by: | tk |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | DojoX Widgets | Version: | 0.3 |
| Severity: | normal | Keywords: | SlideShow Banner slideShowBanner imageBanner |
| Cc: |
Description (last modified by dylan) (diff)
Basically this is an expansion of the slideShow widget... might could possibly be used as an inherit to reduce its size (im not that great with JS so I'd need outside explanation of that) (long... but my email to the dojo-interest list back when I originally finished this for 0.2.0
A working example can be found at http://dojo.xnet.org (its a demo page stripped from what I needed it for -- this example is using the 0.2.0 code, but its functionality is the same, a working example of the 0.3.0 code can be found at www.ls1powertuning.com/header.html
A few tidbits... this is based off of the SlideShow? widget (props to whoever wrote that it was a big help!) and this widget does a few things...
1) its written for me... so I tried making everything an option that others might not use... 2) it supports a background image and a logo image (sits on top of the widgets images) 3) it supports multiple directories for images so you can have it pool files of different types ie. images/ImageBanner/cars; images/ImageBanner/boats; 4) it is limited in its functionality on files... since JS cant read serverside w/o serverside+Ajax I opted for the generic 1.jpg 2.jpg 3.jog naming system for all the images 5) you must tell it how many images are in each directory, by doing this you can also limit each directory to only showing the first image or first 2... 6) it tracks the last X images (where X is the number of tile positions across the banner) and will not repeat them (I just realized I didnt make an on/off switch for this... so we're stuck with that for the time being 7) you can roate the images left to right or right to left 8) the rotation can start at a random location or all the way to the left (I think it may support hard coding the location in the HTML as well, dont remember off the top of my head) 9) the biggest thing I did... it compares the defined backgroundWidth against the tileWidth you setup for the banner images, and calculates an offset so that the images always start at the far left and end on the far right margin of the background iamge (in the demo I linked to the background is 1024 and the images are 192px wide, yet the images still line up perfect at the end ;)) 10) features from slideshow carried over: you can pause/unpause by clicking on the widget, and it resumes without a hitch now (continues where it left off)