source: [view]
this.widgetid = this.id;
this.inherited(arguments)
this.thumbPicker = new dojox.image.ThumbnailPicker({
linkAttr: this.linkAttr,
imageLargeAttr: this.imageLargeAttr,
imageThumbAttr: this.imageThumbAttr,
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){
_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();