Trying the accordion feature as offered at: http://wiki.script.aculo.us/scriptaculous/show/accordion+feature The objective is to remove the "jump" reported in the Rico accordion feature. My demo of the scriptaculous feature, however has a noticeable jump when tested if FireFox. and IE Win. See: http://www.jimdavis.org/accord3.html Have I implemented this incorrectly? Jim _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Jim, I think you misread that page. The Rico accordion does not jump, but this script.aculo.us based implementation does, the person posting the code on the wiki was looking for advise on getting ride of the jump. I wouldn''t mind an accordion in script.aculo.us though!! ______________________________________________________________________ Alex Duffield . Principal . InControl Solutions . http:// www.incontrolsolutions.com On 20-Jan-06, at 4:40 PM, Jim Davis wrote:> Trying the accordion feature as offered at: > http://wiki.script.aculo.us/scriptaculous/show/accordion+feature > > The objective is to remove the "jump" reported in the Rico > accordion feature. My demo of the scriptaculous feature, however > has a noticeable jump when tested if FireFox. and IE Win. See: > http://www.jimdavis.org/accord3.html > > Have I implemented this incorrectly? > > Jim > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Alex, Thanks. Must have been a short in the headset! Jim On 1/20/06, Alex Duffield <alex-GLL9njBnHiGqPKKiFzS5XxZCeNDtXRbv@public.gmane.org> wrote:> > Jim, I think you misread that page. The Rico accordion does not jump, but > this script.aculo.us based implementation does, the person posting the > code on the wiki was looking for advise on getting ride of the jump. > I wouldn''t mind an accordion in script.aculo.us though!! > > ______________________________________________________________________ > > *Alex Duffield* *.* *Principal* *.* *InControl Solutions* *.* * > http://www.incontrolsolutions.com* <http://www.incontrolsolutions.com/> > > > > > On 20-Jan-06, at 4:40 PM, Jim Davis wrote: > > Trying the accordion feature as offered at: > http://wiki.script.aculo.us/scriptaculous/show/accordion+feature > > The objective is to remove the "jump" reported in the Rico accordion > feature. My demo of the scriptaculous feature, however has a noticeable jump > when tested if FireFox. and IE Win. See: > http://www.jimdavis.org/accord3.html > > Have I implemented this incorrectly? > > Jim > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Is it possible that the "jump up" is because the two effects are happening on different timers? For a smooth accordian effect, it should blind down one pixel for every pixel it blinds up on the other div. I think to get this to work right it''d have to be done w/out using BlindDown or BlindUp but with a new effect that would synchronize the effect. Or am I way off base here?
You are right. -Thomas Am 21.01.2006 um 07:40 schrieb Kenneth Lee:> Is it possible that the "jump up" is because the two effects are > happening on different timers? For a smooth accordian effect, it > should blind down one pixel for every pixel it blinds up on the other > div. I think to get this to work right it''d have to be done w/out > using BlindDown or BlindUp but with a new effect that would > synchronize the effect. > > Or am I way off base here? > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
One limitation I see with the Accordian method here is that it doesn''t work right if you have different height panels - they all take the height of the first panel. May have a stab at addressing this tomorrow unless someone knows of an easy solution? _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I was thinking that the accordian could do one of two things. Assuming we have panel A, B and C stacked vertically with A currently the ''expanded'' panel and the user has clicked on B. 1) Shrink A one pixel at a time while expanding B one pixel at a time. When either one hits the limit, then only modify the remaining panel. So if A is taller than B, then B will be fully displayed while A is still shrinking. 2) Calculate the ratio of heights between A and B and scale the shrinking/growth accordingly. So if A is 100px high and B 50px, shrink A 2 pixels for every 1 pixels that B has. However, due to rounding we could see a 1 pixel "wobble". The effect might also be particularly annoying where the ratio is exaggerated -- picture a 20:1 change... On 1/23/06, Chris Korhonen <ckorhonen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ShOne limitation I see with the Accordian method here is that it doesn''t work > right if you have different height panels - they all take the height of the > first panel. May have a stab at addressing this tomorrow unless someone > knows of an easy solution? > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
I was thinking that the accordian could do one of two things.> Assuming we have panel A, B and C stacked vertically with A currently > the ''expanded'' panel and the user has clicked on B. > > 1) Shrink A one pixel at a time while expanding B one pixel at a time. > When either one hits the limit, then only modify the remaining panel. > So if A is taller than B, then B will be fully displayed while A is > still shrinking. > > 2) Calculate the ratio of heights between A and B and scale the > shrinking/growth accordingly. So if A is 100px high and B 50px, > shrink A 2 pixels for every 1 pixels that B has. However, due to > rounding we could see a 1 pixel "wobble". The effect might also be > particularly annoying where the ratio is exaggerated -- picture a 20:1 > change...I like the second suggestion, as it would maintain a constant tranisition time, though yeah, I see whereyou are coming from with the wobble. Its a tricky one, compounded by the fact that a requirement is that the accordian takes up the majority of the page - you might be able to get away with small wobbles etc. if it were a smaller picture, but as its to be the focal point of the page it has to be perfect. Some code bashing to do tommorrow methinks. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I tried getting rid of the blind up, and using the "beforeUpdate" in the blind downs to set the height of the elup element.. I figured that way on each iteration of the animation the two elements would change by the same amount. No luck. I could really use this feature though, so if someone comes up with a good solution please post it! Cheers. parentH = (Element.getHeight(el.parentNode); $(eldown).style.height = parentH-(25*4)+"px"; // 4 panels 25px high each // new Effect.BlindUp(elup, {duration:0.3}); new Effect.BlindDown( eldown, { duration:0.3, beforeUpdate:function(){ $(elup).style.height = parentH - Element.getHeight(eldown)+"px"; }, afterFinish:function(){ $(elup).style.height = 0+"px"; $(elup).style.display = "none"; } }); ______________________________________________________________________ Alex Duffield . Principal . InControl Solutions . http:// www.incontrolsolutions.com On 23-Jan-06, at 2:06 PM, Chris Korhonen wrote:> I was thinking that the accordian could do one of two things. > Assuming we have panel A, B and C stacked vertically with A currently > the ''expanded'' panel and the user has clicked on B. > > 1) Shrink A one pixel at a time while expanding B one pixel at a time. > When either one hits the limit, then only modify the remaining panel. > So if A is taller than B, then B will be fully displayed while A is > still shrinking. > > 2) Calculate the ratio of heights between A and B and scale the > shrinking/growth accordingly. So if A is 100px high and B 50px, > shrink A 2 pixels for every 1 pixels that B has. However, due to > rounding we could see a 1 pixel "wobble". The effect might also be > particularly annoying where the ratio is exaggerated -- picture a 20:1 > change... > > > I like the second suggestion, as it would maintain a constant > tranisition time, though yeah, I see whereyou are coming from with > the wobble. Its a tricky one, compounded by the fact that a > requirement is that the accordian takes up the majority of the page > - you might be able to get away with small wobbles etc. if it were > a smaller picture, but as its to be the focal point of the page it > has to be perfect. Some code bashing to do tommorrow methinks. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs