From 741d62b401cb7cf4b36f733c19af7b45ba51b1a8 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Tue, 2 Sep 2008 09:18:30 +0000 Subject: [PATCH 1/1] to stop leaking showwin's internals, make a trivial getter --- include/show.js | 8 ++++---- include/showwin.js | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/show.js b/include/show.js index 806d3c1..b9ee1a0 100644 --- a/include/show.js +++ b/include/show.js @@ -75,9 +75,9 @@ var Show = new Class({ set('class', 'mainformat'). setProperty('alt', 'Current Image'). setStyle('opacity', 0). - injectInside(this.container.container); + injectInside(this.container.domelement()); this.ondisplay = this.prevdisplay.clone(). - injectInside(this.container.container); + injectInside(this.container.domelement()); this.loadingdiv = new Element('div'). addClass('loading').setStyles({ position: 'absolute', @@ -87,7 +87,7 @@ var Show = new Class({ display: 'none', width: this.coords.width, height: this.coords.height, - }).injectInside(this.container.container); + }).injectInside(this.container.domelement()); window.addEvent('resize', this.resizer.bind(this)) }, @@ -251,7 +251,7 @@ var Show = new Class({ }); this.prevdisplay.dispose(); this.prevdisplay = this.ondisplay.clone(). - setStyle('zIndex', 2).injectInside(this.container.container); + setStyle('zIndex', 2).injectInside(this.container.domelement()); newimg.replaces(this.ondisplay); this.ondisplay = newimg; this.effect(); diff --git a/include/showwin.js b/include/showwin.js index 7e44357..1097877 100644 --- a/include/showwin.js +++ b/include/showwin.js @@ -101,7 +101,11 @@ var showWindow = new Class({ } document.body.setStyles(this.bodystyles); this.container.setStyle('display', 'none'); - } + }, + + domelement: function(){ + return this.container; + }, }) showWindow.implement(new Options); -- 2.39.2