I posted the following earlier: "I need a way to do a blind up that makes the element APPEAR and a blind down that makes the element DISAPPEAR. In essence, the opposite of the current blindup/blinddown. Thoughts?" I think somebody responded in Dutch. Anyone else have any ideas? -- Yehuda Katz Web Developer (ph) 718.877.1325 (fax) 718.686.4288 _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I think that dutch reply is an out-of-office autoresponder, but I couldn''t really read it. I got it automatically after posting to the list yesterday. I don''t believe anyone has built those effects, but it would be cool to have them. I had considered doing it (as well as BlindLeft and BlindRight), but I never got around to it. You should be able to use the existing effects as a base, and just modify the direction they go in. Good luck. ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Yehuda Katz Sent: Wednesday, February 08, 2006 11:38 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Effect Help I posted the following earlier: "I need a way to do a blind up that makes the element APPEAR and a blind down that makes the element DISAPPEAR. In essence, the opposite of the current blindup/blinddown. Thoughts?" I think somebody responded in Dutch. Anyone else have any ideas? -- Yehuda Katz Web Developer (ph) 718.877.1325 (fax) 718.686.4288 _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I''m not sure how to go about doing that, as it seems the core scale effect only goes in one direction. Or am I reading the js wrong? On 2/8/06, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote:> > I think that dutch reply is an out-of-office autoresponder, but I > couldn''t really read it. I got it automatically after posting to the list > yesterday. > > > > I don''t believe anyone has built those effects, but it would be cool to > have them. I had considered doing it (as well as BlindLeft and BlindRight), > but I never got around to it. You should be able to use the existing > effects as a base, and just modify the direction they go in. > > > > Good luck. > > > > > ------------------------------ > > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: > rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] *On Behalf Of *Yehuda Katz > *Sent:* Wednesday, February 08, 2006 11:38 AM > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* [Rails-spinoffs] Effect Help > > > > I posted the following earlier: > > "I need a way to do a blind up that makes the element APPEAR and a blind > down that makes the element DISAPPEAR. In essence, the *opposite* of the > current blindup/blinddown. > > Thoughts?" > > I think somebody responded in Dutch. Anyone else have any ideas? > > -- > Yehuda Katz > Web Developer > (ph) 718.877.1325 > (fax) 718.686.4288 > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >-- Yehuda Katz Web Developer (ph) 718.877.1325 (fax) 718.686.4288 _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Anyone? On 2/8/06, Yehuda Katz <wycats-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m not sure how to go about doing that, as it seems the core scale effect > only goes in one direction. Or am I reading the js wrong? > > On 2/8/06, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote: > > > I think that dutch reply is an out-of-office autoresponder, but I > > couldn''t really read it. I got it automatically after posting to the list > > yesterday. > > > > > > > > I don''t believe anyone has built those effects, but it would be cool to > > have them. I had considered doing it (as well as BlindLeft and BlindRight), > > but I never got around to it. You should be able to use the existing > > effects as a base, and just modify the direction they go in. > > > > > > > > Good luck. > > > > > > > > > > ------------------------------ > > > > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: > > rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] * On Behalf Of *Yehuda > > Katz > > *Sent:* Wednesday, February 08, 2006 11:38 AM > > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > *Subject:* [Rails-spinoffs] Effect Help > > > > > > > > I posted the following earlier: > > > > "I need a way to do a blind up that makes the element APPEAR and a blind > > down that makes the element DISAPPEAR. In essence, the *opposite* of the > > current blindup/blinddown. > > > > Thoughts?" > > > > I think somebody responded in Dutch. Anyone else have any ideas? > > > > -- > > Yehuda Katz > > Web Developer > > (ph) 718.877.1325 > > (fax) 718.686.4288 > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > -- > Yehuda Katz > Web Developer > (ph) 718.877.1325 > (fax) 718.686.4288 >-- Yehuda Katz Web Developer (ph) 718.877.1325 (fax) 718.686.4288 _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi all, I''m still trying to work out how to do a blind up to make an element appear and a blind down to disappear. I haven''t been able to adequate decipher the core effects to figure out how to make it happen, although I can see that it''ll require Effect.scale. Can anyone point me to documentation that''d help me along (other than the one on the main wiki, which hasn''t helped enough), or describe how to go about doing it? -- Yehuda Katz _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> I''m still trying to work out how to do a blind up to make an element > appear and a blind down to disappear. I haven''t been able to adequate > decipher the core effects to figure out how to make it happen, although I > can see that it''ll require Effect.scale. Can anyone point me to > documentation that''d help me along (other than the one on the main wiki, > which hasn''t helped enough), or describe how to go about doing it? > > -- Yehuda KatzI imagine you''ll have to set up a way for the div''s margin-top setting to be complementary to the div height. In other words, as the blind-down progresses the margin-top gets larger, and the margin-top will have to start as the full div height for the blind-up and shrink as the Effect.scaleincreases the visible portion of the div. Sorry I don''t have the means to provide code for that, good luck though! - Danger _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hey Yehuda, I''ve created some code for a core effect called "adjust" that handles margin and padding adjustments (as Danger was suggesting)...I expect using this adjust effect and a slightly modified BlindUp/Down you could do what you want. If nothing else it should help you get a bit more of an idea of some of the options available.... //BEGIN CODE Effect.Adjust = Class.create(); Object.extend(Object.extend(Effect.Adjust.prototype, Effect.Base.prototype), { initialize: function(element, property) { this.element = $(element); this.property = property; var options = Object.extend({ toRight: null, toLeft: null, toTop: null, toBottom: null }, arguments[2] || {}); this.originalRight = parseFloat(Element.getStyle(this.element, property + ''-right'') || ''0''); this.originalLeft = parseFloat(Element.getStyle(this.element, property + ''-left'') || ''0''); this.originalTop = parseFloat(Element.getStyle(this.element, property + ''-top'') || ''0''); this.originalBottom = parseFloat(Element.getStyle(this.element, property + ''-bottom'') || ''0''); this.start(options); }, update: function(position) { rightd = (this.originalRight * (1-position)) + (this.options.toRight * position); leftd = (this.originalLeft * (1-position)) + (this.options.toLeft * position); topd = (this.originalTop * (1-position)) + (this.options.toTop * position); bottomd = (this.originalBottom * (1-position)) + (this.options.toBottom* position); this.makeAdjustment(rightd, leftd, topd, leftd); }, makeAdjustment: function(rightd, leftd, topd, bottomd) { if(this.options.toRight != null) { this.element.style[this.property + ''Right''] = rightd + "px"; } if(this.options.toLeft != null) { this.element.style[this.property+''Left''] = leftd + "px"; } if(this.options.toTop != null) { this.element.style[this.property + ''Top''] = topd + "px"; } if(this.options.toBottom != null) { this.element.style[this.property + ''Bottom''] = bottomd + "px"; } } }); //sample effect...takes an element, changes the right margin to the specified size Effect.ChangeRightMargin = function(element, to) { new Effect.Adjust(element, ''margin'', {toRight: to}); } //END CODE Hope it helps... -Jerod On 2/13/06, Danger Stevens <scriptaculous-lStfaJuyqK+JRkHgdjSK1w@public.gmane.org> wrote:> > > I''m still trying to work out how to do a blind up to make an element > > appear and a blind down to disappear. I haven''t been able to adequate > > decipher the core effects to figure out how to make it happen, although I > > can see that it''ll require Effect.scale. Can anyone point me to > > documentation that''d help me along (other than the one on the main wiki, > > which hasn''t helped enough), or describe how to go about doing it? > > > > -- Yehuda Katz > > > I imagine you''ll have to set up a way for the div''s margin-top setting to > be complementary to the div height. In other words, as the blind-down > progresses the margin-top gets larger, and the margin-top will have to start > as the full div height for the blind-up and shrink as the Effect.scaleincreases the visible portion of the div. > Sorry I don''t have the means to provide code for that, good luck though! > > - Danger > > > > _______________________________________________ > 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