Dirk Eschler
2006-Jan-20 13:09 UTC
Height problem after interrupting SlideDown/SlideUp effects
Hi, i have a problem with the the SlideDown and SlideUp effects. Since a similiar problem is also visible on the script.aculo.us homepage, i''m going to explain it this way. - Go to http://script.aculo.us/ - On the main site below "visual effects", click "Advanced options", the sub panel will scroll down. - Hit the close button, and while the panel is still scrolling up, quickly hit the "Advanced options" link again. - Now, when you try to show the sub panel, it won''t regain it''s full height, but gets a much lower height (probably the one while the effect was interrupted). The same happens when you interrupt the SlideDown effect by rapidly hitting the "Advanced options" link. I can reproduce it in Firefox, Konqueror and Opera. Is there a good way of preventing this already, or do i have to care about locking the effect triggers myself? Best Regards. -- Dirk Eschler zeitform Internet Dienste mailto:eschler-zc1r9W/44D4b1SvskN2V4Q@public.gmane.org Fraunhoferstraße 5 PGP S/MIME: http://key.zeitform.de/ap 64283 Darmstadt, Germany Tel./Fax: +49 (0) http://www.zeitform.de
Abdur-Rahman Advany
2006-Jan-20 15:07 UTC
Re: Height problem after interrupting SlideDown/SlideUp effects
Dirk, In the latest svn there is a option limit, you can read about it on www.railsdevelopment.com/2006/01/15/effectqueue/. It will limit the ''effects'' that can be added to the queue, so it doesn''t execute a other queue while processing the first. Abdur-Rahman Advany Dirk Eschler wrote:> Hi, > > i have a problem with the the SlideDown and SlideUp effects. Since a similiar > problem is also visible on the script.aculo.us homepage, i''m going to explain > it this way. > > - Go to http://script.aculo.us/ > - On the main site below "visual effects", click "Advanced options", the sub > panel will scroll down. > - Hit the close button, and while the panel is still scrolling up, quickly hit > the "Advanced options" link again. > - Now, when you try to show the sub panel, it won''t regain it''s full height, > but gets a much lower height (probably the one while the effect was > interrupted). > > The same happens when you interrupt the SlideDown effect by rapidly hitting > the "Advanced options" link. I can reproduce it in Firefox, Konqueror and > Opera. > > Is there a good way of preventing this already, or do i have to care about > locking the effect triggers myself? > > Best Regards. > >
Matthias Platzer
2006-Jan-20 15:12 UTC
Re: Height problem after interrupting SlideDown/SlideUp effects
hi, that was fixed in the latest svn version. see: http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/CHANGELOG * Add limit option to effect queues to limit the maximum number of effects in a queue, new unit tests for scoped effect queues, fixes #3498 [thx Abdur-Rahman Advany] http://dev.rubyonrails.org/ticket/3498 at least if you are using Effect.toggle greets matthias Dirk Eschler schrieb:> Hi, > > i have a problem with the the SlideDown and SlideUp effects. Since a similiar > problem is also visible on the script.aculo.us homepage, i''m going to explain > it this way. > > - Go to http://script.aculo.us/ > - On the main site below "visual effects", click "Advanced options", the sub > panel will scroll down. > - Hit the close button, and while the panel is still scrolling up, quickly hit > the "Advanced options" link again. > - Now, when you try to show the sub panel, it won''t regain it''s full height, > but gets a much lower height (probably the one while the effect was > interrupted). > > The same happens when you interrupt the SlideDown effect by rapidly hitting > the "Advanced options" link. I can reproduce it in Firefox, Konqueror and > Opera. > > Is there a good way of preventing this already, or do i have to care about > locking the effect triggers myself? > > Best Regards. >-- knallgrau new media solutions gmbh pezzlgasse 7, 1190 wien phone: +43 - 1 - 522 76 37 fax: +43 - 1 - 522 76 38 http://www.knallgrau.at/company/weblog
Dirk Eschler
2006-Jan-20 16:55 UTC
Re: Height problem after interrupting SlideDown/SlideUp effects
Am Freitag, 20. Januar 2006 16:12 schrieb Matthias Platzer:> hi, > > that was fixed in the latest svn version. > > see: > http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/CHANGELOG > > * Add limit option to effect queues to limit the maximum number of > effects in a queue, new unit tests for scoped effect queues, fixes #3498 > [thx Abdur-Rahman Advany] > > http://dev.rubyonrails.org/ticket/3498 > > > at least if you are using Effect.toggle > > greets > matthiasThanks alot for your answers. I''ll give it a try. -- Dirk Eschler zeitform Internet Dienste mailto:eschler-zc1r9W/44D4b1SvskN2V4Q@public.gmane.org Fraunhoferstraße 5 PGP S/MIME: http://key.zeitform.de/ap 64283 Darmstadt, Germany Tel./Fax: +49 (0) http://www.zeitform.de
Matthias Platzer
2006-Jan-20 18:38 UTC
Re: Height problem after interrupting SlideDown/SlideUp effects
Hi Abdur-Rahman Advany, first of all great article, and thanks for adding the limit-feature. it may seem picky, but it''s not perfect yet. if you use Effect.toggle() on mouseover/mouseout on an element (for example a tooltip) it won''t trigger the mouseout event. (close the element again). a better behavior of Effect.toggle would be: cancel the running effect, and call the new effect at the point where the old effect currently is in time. (set duration of the new effect to the duration of the old effect) for a demo see: http://static.twoday.net/matsblog/stuff/Tooltip/Tooltip.Demo.html for this example i implemented the following code: http://static.twoday.net/matsblog/stuff/Tooltip/tooltips.js open: function(event) { //... var duration = this.options.duration; if (this.runningEffect) { var queue = Effect.Queues.get(this.options.queue.scope); duration = Math.min(new Date().getTime() - this.runningEffect.startOn, duration); queue.remove(this.runningEffect); } this.runningEffect Effect[Effect.PAIRS[this.effectName][0]]( this.popUp, Object.extend( Object.extend({}, this.options), {duration: duration} )); //... }, close: function() { //... var duration = this.options.duration; if (this.runningEffect) { var queue = Effect.Queues.get(this.options.queue.scope); duration = Math.min(new Date().getTime() - this.runningEffect.startOn, duration); queue.remove(this.runningEffect); } this.runningEffect Effect[Effect.PAIRS[this.effectName][1]]( this.popUp, Object.extend( Object.extend({}, this.options), {duration: duration} )); //... } this is far from elegant, but maybe it''s a good starting point for Effect.toggle matthias Abdur-Rahman Advany schrieb:> Dirk, > > In the latest svn there is a option limit, you can read about it on > www.railsdevelopment.com/2006/01/15/effectqueue/. > It will limit the ''effects'' that can be added to the queue, so it > doesn''t execute a other queue while processing the first. > > Abdur-Rahman Advany > > Dirk Eschler wrote: >> Hi, >> >> i have a problem with the the SlideDown and SlideUp effects. Since a >> similiar problem is also visible on the script.aculo.us homepage, i''m >> going to explain it this way. >> >> - Go to http://script.aculo.us/ >> - On the main site below "visual effects", click "Advanced options", >> the sub panel will scroll down. >> - Hit the close button, and while the panel is still scrolling up, >> quickly hit the "Advanced options" link again. >> - Now, when you try to show the sub panel, it won''t regain it''s full >> height, but gets a much lower height (probably the one while the >> effect was interrupted). >> >> The same happens when you interrupt the SlideDown effect by rapidly >> hitting the "Advanced options" link. I can reproduce it in Firefox, >> Konqueror and Opera. >> >> Is there a good way of preventing this already, or do i have to care >> about locking the effect triggers myself? >> >> Best Regards. >> >> > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- knallgrau new media solutions gmbh pezzlgasse 7, 1190 wien phone: +43 - 1 - 522 76 37 fax: +43 - 1 - 522 76 38 http://www.knallgrau.at/company/weblog
Abdur-Rahman Advany
2006-Jan-20 21:03 UTC
Re: Height problem after interrupting SlideDown/SlideUp effects
Matthias, Thnx, I can''t agree more. However its a good solution for now :) I made the limit for everything else except toggle, but I patched it because I though it would improve it a bit. At this moment I am writing an article about the core effect and I was looking into this too. Next week I will have some time, maybe I can make a better solution. Greets, Abdur-Rahman Matthias Platzer wrote:> Hi Abdur-Rahman Advany, > > first of all great article, and thanks for adding the limit-feature. > > it may seem picky, but it''s not perfect yet. > if you use Effect.toggle() on mouseover/mouseout on an element (for > example a tooltip) it won''t trigger the mouseout event. (close the > element again). > > a better behavior of Effect.toggle would be: > cancel the running effect, and call the new effect at the point where > the old effect currently is in time. (set duration of the new effect > to the duration of the old effect) > > for a demo see: > http://static.twoday.net/matsblog/stuff/Tooltip/Tooltip.Demo.html > > > for this example i implemented the following code: > http://static.twoday.net/matsblog/stuff/Tooltip/tooltips.js > > open: function(event) { > //... > var duration = this.options.duration; > if (this.runningEffect) { > var queue = Effect.Queues.get(this.options.queue.scope); > duration = Math.min(new Date().getTime() - > this.runningEffect.startOn, duration); > queue.remove(this.runningEffect); > } > this.runningEffect > Effect[Effect.PAIRS[this.effectName][0]]( > this.popUp, Object.extend( > Object.extend({}, this.options), {duration: duration} > )); > //... > }, > > close: function() { > //... > var duration = this.options.duration; > if (this.runningEffect) { > var queue = Effect.Queues.get(this.options.queue.scope); > duration = Math.min(new Date().getTime() - > this.runningEffect.startOn, duration); > queue.remove(this.runningEffect); > } > this.runningEffect > Effect[Effect.PAIRS[this.effectName][1]]( > this.popUp, Object.extend( > Object.extend({}, this.options), {duration: duration} > )); > //... > } > > > this is far from elegant, but maybe it''s a good starting point for > Effect.toggle > > > matthias > > > > Abdur-Rahman Advany schrieb: >> Dirk, >> >> In the latest svn there is a option limit, you can read about it on >> www.railsdevelopment.com/2006/01/15/effectqueue/. >> It will limit the ''effects'' that can be added to the queue, so it >> doesn''t execute a other queue while processing the first. >> >> Abdur-Rahman Advany >> >> Dirk Eschler wrote: >>> Hi, >>> >>> i have a problem with the the SlideDown and SlideUp effects. Since a >>> similiar problem is also visible on the script.aculo.us homepage, >>> i''m going to explain it this way. >>> >>> - Go to http://script.aculo.us/ >>> - On the main site below "visual effects", click "Advanced options", >>> the sub panel will scroll down. >>> - Hit the close button, and while the panel is still scrolling up, >>> quickly hit the "Advanced options" link again. >>> - Now, when you try to show the sub panel, it won''t regain it''s full >>> height, but gets a much lower height (probably the one while the >>> effect was interrupted). >>> >>> The same happens when you interrupt the SlideDown effect by rapidly >>> hitting the "Advanced options" link. I can reproduce it in Firefox, >>> Konqueror and Opera. >>> >>> Is there a good way of preventing this already, or do i have to care >>> about locking the effect triggers myself? >>> >>> Best Regards. >>> >>> >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >