dojox.image.Gallery.postCreate
dojo.require("dojox.image.Gallery");
defined in dojox/image/Gallery.js
Initializes the widget, creates the ThumbnailPicker and SlideShow widgets
Usage
function () (view source)
this.widgetid = this.id; this.inherited(arguments) this.thumbPicker = new dojox.image.ThumbnailPicker({ linkAttr: this.linkAttr, imageLargeAttr: this.imageLargeAttr, titleAttr: this.titleAttr, useLoadNotifier: true, size: this.imageWidth }, this.thumbPickerNode); this.slideShow = new dojox.image.SlideShow({ imageHeight: this.imageHeight, imageWidth: this.imageWidth, autoLoad: this.autoLoad, linkAttr: this.linkAttr, imageLargeAttr: this.imageLargeAttr, titleAttr: this.titleAttr, slideshowInterval: this.slideshowInterval, pageSize: this.pageSize }, this.slideShowNode); var _this = this; //When an image is shown in the Slideshow, make sure it is visible //in the ThumbnailPicker dojo.subscribe(this.slideShow.getShowTopicName(), function(packet){ //if(packet.index < _this.thumbPicker._thumbIndex // || packet.index > _this.thumbPicker._thumbIndex + _this.thumbPicker.numberThumbs -1){ //if(!_this.thumbPicker.isVisible(packet.index)){ //var index = packet.index - (packet.index % _this.thumbPicker.numberThumbs); _this.thumbPicker._showThumbs(packet.index); //} }); //When the user clicks a thumbnail, show that image dojo.subscribe(this.thumbPicker.getClickTopicName(), function(evt){ _this.slideShow.showImage(evt.index); }); //When the ThumbnailPicker moves to show a new set of pictures, //make the Slideshow start loading those pictures first. dojo.subscribe(this.thumbPicker.getShowTopicName(), function(evt){ _this.slideShow.moveImageLoadingPointer(evt.index); }); //When an image finished loading in the slideshow, update the loading //notification in the ThumbnailPicker dojo.subscribe(this.slideShow.getLoadTopicName(), function(index){ _this.thumbPicker.markImageLoaded(index); }); this._centerChildren();