- this.prevdisplay.dispose();
- this.prevdisplay = this.ondisplay.clone().
- setStyle('zIndex', 2).injectInside(this.container.domelement());
- newimg.replaces(this.ondisplay);
- this.ondisplay = newimg;
+ this.ondisplay.replaces(this.prevdisplay).
+ setProperty('alt', 'Previous Image').
+ setStyle('zIndex', 2);
+ this.prevdisplay = this.ondisplay;
+ this.ondisplay = newimg.
+ injectInside(this.container.domelement());