I thought the duration parameter was only used with Effect functions, but I could be wrong. Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson > Sent: Tuesday, April 25, 2006 8:37 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Element.scrollTo duration isn''t working > > Does anybody have any ideas what I am doing wrong? The durationparameter> seems to have no effect on the scrollTo function. > > Element.scrollTo(divId, {duration: 5.0}); > > Am I using this correctly? Thanks. > > Joe > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I think you''re right... I think the documentation might be wrong:
http://wiki.script.aculo.us/scriptaculous/show/Element.scrollTo
I thought I was missing something because I''m no expert but this is the
code
I thought it was using which has no mention of a duration:
scrollTo: function(element) {
element = $(element);
var x = element.x ? element.x : element.offsetLeft,
y = element.y ? element.y : element.offsetTop;
window.scrollTo(x, y);
},
Thanks for the response.
Joe
> -----Original Message-----
> From:
rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-
> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of
Gregory Hill
> Sent: Tuesday, April 25, 2006 10:41 AM
> To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Subject: RE: [Rails-spinoffs] Element.scrollTo duration isn''t
working
>
> I thought the duration parameter was only used with Effect functions,
> but I could be wrong.
>
> Greg
>
> > -----Original Message-----
> > From:
rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> [mailto:rails-spinoffs-
> > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf
Of Joe Hudson
> > Sent: Tuesday, April 25, 2006 8:37 AM
> > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > Subject: [Rails-spinoffs] Element.scrollTo duration isn''t
working
> >
> > Does anybody have any ideas what I am doing wrong? The duration
> parameter
> > seems to have no effect on the scrollTo function.
> >
> > Element.scrollTo(divId, {duration: 5.0});
> >
> > Am I using this correctly? Thanks.
> >
> > Joe
> >
> >
> > _______________________________________________
> > 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
>
I would like to resize a div to half the size that it was and would like to
use the BlindUp transition. I think that I need the scaleTo parameter from
the docs: http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown
But this doesn''t exactly work.
new Effect.BlindUp(gridId, {scaleTo: 50});
What happens is that the div does the blind up transition until it is half
the original size then it disappears. Is there any way I can not make the
div disappear? Thanks for your help.
Joe
You need to use Effect.scrollTo not Element.scrollTo. See http://wiki.script.aculo.us/scriptaculous/show/Effect.scrollTo -Thomas Am 25.04.2006 um 16:54 schrieb Joe Hudson:> I think you''re right... I think the documentation might be wrong: > http://wiki.script.aculo.us/scriptaculous/show/Element.scrollTo > > I thought I was missing something because I''m no expert but this is > the code > I thought it was using which has no mention of a duration: > > scrollTo: function(element) { > element = $(element); > var x = element.x ? element.x : element.offsetLeft, > y = element.y ? element.y : element.offsetTop; > window.scrollTo(x, y); > }, > > Thanks for the response. > > Joe > >> -----Original Message----- >> From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- >> spinoffs- >> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill >> Sent: Tuesday, April 25, 2006 10:41 AM >> To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> Subject: RE: [Rails-spinoffs] Element.scrollTo duration isn''t working >> >> I thought the duration parameter was only used with Effect functions, >> but I could be wrong. >> >> Greg >> >>> -----Original Message----- >>> From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> [mailto:rails-spinoffs- >>> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson >>> Sent: Tuesday, April 25, 2006 8:37 AM >>> To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> Subject: [Rails-spinoffs] Element.scrollTo duration isn''t working >>> >>> Does anybody have any ideas what I am doing wrong? The duration >> parameter >>> seems to have no effect on the scrollTo function. >>> >>> Element.scrollTo(divId, {duration: 5.0}); >>> >>> Am I using this correctly? Thanks. >>> >>> Joe >>> >>> >>> _______________________________________________ >>> 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 >> > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
If no one has an answer to this, would anybody be able to tell me how to do the following: - how to get the height of a block element - how to set the height of a block element I''m sure these are trivial but I just haven''t found the correct methods to do so. Thanks very much. Joe> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson > Sent: Tuesday, April 25, 2006 10:59 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div > > I would like to resize a div to half the size that it was and would like > to > use the BlindUp transition. I think that I need the scaleTo parameter > from > the docs: http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > But this doesn''t exactly work. > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > What happens is that the div does the blind up transition until it is half > the original size then it disappears. Is there any way I can not make the > div disappear? Thanks for your help. > > Joe > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
On Wednesday 26 April 2006 06:44, Joe Hudson wrote:> If no one has an answer to this, would anybody be able to tell me how to do > the following: > > - how to get the height of a block elementvar dims = Element.getDimensions(element); dims.height;> - how to set the height of a block elementElement.setStyle(element, {height: 123}); -Jeremy _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Leon Chevalier
2006-Apr-27 10:12 UTC
Prevent IE background image reloading on scriptaculous drag
Hi all,
Just a quick FYI to anyone who may have this problem, as I was writing a
question and then solved it myself. The prob:
I have a draggable div that uses a dropshadow as follows:
<script src="http://demo.script.aculo.us/scripts/prototype.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/effects.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/dragdrop.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/controls.js"
type="text/javascript"></script>
<style type="text/css">
<!--
#innerDiv {
cursor:move;
}
.dropShadow {
padding-right:2px;
background:url(http://www.abomb.co.uk/images/bgr_drop_right_trans.gif)
no-repeat right top;
}
.dropShadowBottom {
width:100%;
height:2px;
background:url(http://www.abomb.co.uk/images/bgr_drop_bottom_trans.gif)
no-repeat left bottom;
margin-bottom:-2px;
position:relative;
}
-->
</style>
<div id="dragMe" class="dropShadow" style="position:
absolute; width: 165px;
left: 28px; top: 28px; z-index: 100;">
<div id="innerDiv">
Hello drag me about
</div>
<div class="dropShadowBottom"></div>
</div>
<script type="text/javascript">new
Draggable(''dragMe'')</script>
Everything is great in Firefox, but in IE the background image re-loads on
drag. Even if you set "Check for newer version of stored pages" to
"Never"
the mouse pointer constantly shows re-loading.
The workaround is to make sure that the element which is draggable
doesn''t
have the background image - set the background image to a child div instead:
<div id="dragMe" style="position: absolute; width: 165px;
left: 28px; top:
28px; z-index: 100;">
<div class="dropShadow">
<div id="innerDiv">
Hello drag me about
</div>
<div class="dropShadowBottom"></div>
</div>
</div>
Hope this helps someone.
Leon
Andrzej Rumpfelt
2006-Apr-27 10:30 UTC
Re: Prevent IE background image reloading onscriptaculous drag
Hi,
strange.. I tested it in IE and with the first example it was reloading images
constantly while dragging.. like it had to reload on every position of this div.
Then I changed the code to your fix and now, while dragging, it''s ok
but when I stop moving the div, then it reloads images.. but why ?
is there a way to avoid this reloading ? I had this problem before in one of my
app but couldn''t solve it for IE
greeitngs,
Andrzej Rumpfelt
----- Original Message -----
From: Leon Chevalier
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Sent: Thursday, April 27, 2006 12:12 PM
Subject: [Rails-spinoffs] Prevent IE background image reloading
onscriptaculous drag
Hi all,
Just a quick FYI to anyone who may have this problem, as I was writing a
question and then solved it myself. The prob:
I have a draggable div that uses a dropshadow as follows:
<script src="http://demo.script.aculo.us/scripts/prototype.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/effects.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/dragdrop.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/controls.js"
type="text/javascript"></script>
<style type="text/css">
<!--
#innerDiv {
cursor:move;
}
.dropShadow {
padding-right:2px;
background:url(http://www.abomb.co.uk/images/bgr_drop_right_trans.gif)
no-repeat right top;
}
.dropShadowBottom {
width:100%;
height:2px;
background:url(http://www.abomb.co.uk/images/bgr_drop_bottom_trans.gif)
no-repeat left bottom;
margin-bottom:-2px;
position:relative;
}
-->
</style>
<div id="dragMe" class="dropShadow"
style="position: absolute; width: 165px;
left: 28px; top: 28px; z-index: 100;">
<div id="innerDiv">
Hello drag me about
</div>
<div class="dropShadowBottom"></div>
</div>
<script type="text/javascript">new
Draggable(''dragMe'')</script>
Everything is great in Firefox, but in IE the background image re-loads on
drag. Even if you set "Check for newer version of stored pages" to
"Never"
the mouse pointer constantly shows re-loading.
The workaround is to make sure that the element which is draggable
doesn''t
have the background image - set the background image to a child div instead:
<div id="dragMe" style="position: absolute; width: 165px;
left: 28px; top:
28px; z-index: 100;">
<div class="dropShadow">
<div id="innerDiv">
Hello drag me about
</div>
<div class="dropShadowBottom"></div>
</div>
</div>
Hope this helps someone.
Leon
_______________________________________________
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
Andrzej Rumpfelt
2006-Apr-27 10:34 UTC
Re: Prevent IE background image reloadingonscriptaculous drag
follow up to myself..
just noticed it reloads twice.. on start and stop dragging..
greetings,
Andrzej Rumpfelt
----- Original Message -----
From: Andrzej Rumpfelt
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Sent: Thursday, April 27, 2006 12:30 PM
Subject: Re: [Rails-spinoffs] Prevent IE background image
reloadingonscriptaculous drag
Hi,
strange.. I tested it in IE and with the first example it was reloading images
constantly while dragging.. like it had to reload on every position of this div.
Then I changed the code to your fix and now, while dragging, it''s ok
but when I stop moving the div, then it reloads images.. but why ?
is there a way to avoid this reloading ? I had this problem before in one of
my app but couldn''t solve it for IE
greeitngs,
Andrzej Rumpfelt
----- Original Message -----
From: Leon Chevalier
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Sent: Thursday, April 27, 2006 12:12 PM
Subject: [Rails-spinoffs] Prevent IE background image reloading
onscriptaculous drag
Hi all,
Just a quick FYI to anyone who may have this problem, as I was writing a
question and then solved it myself. The prob:
I have a draggable div that uses a dropshadow as follows:
<script src="http://demo.script.aculo.us/scripts/prototype.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/effects.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/dragdrop.js"
type="text/javascript"></script>
<script src="http://demo.script.aculo.us/scripts/controls.js"
type="text/javascript"></script>
<style type="text/css">
<!--
#innerDiv {
cursor:move;
}
.dropShadow {
padding-right:2px;
background:url(http://www.abomb.co.uk/images/bgr_drop_right_trans.gif)
no-repeat right top;
}
.dropShadowBottom {
width:100%;
height:2px;
background:url(http://www.abomb.co.uk/images/bgr_drop_bottom_trans.gif)
no-repeat left bottom;
margin-bottom:-2px;
position:relative;
}
-->
</style>
<div id="dragMe" class="dropShadow"
style="position: absolute; width: 165px;
left: 28px; top: 28px; z-index: 100;">
<div id="innerDiv">
Hello drag me about
</div>
<div class="dropShadowBottom"></div>
</div>
<script type="text/javascript">new
Draggable(''dragMe'')</script>
Everything is great in Firefox, but in IE the background image re-loads on
drag. Even if you set "Check for newer version of stored pages" to
"Never"
the mouse pointer constantly shows re-loading.
The workaround is to make sure that the element which is draggable
doesn''t
have the background image - set the background image to a child div instead:
<div id="dragMe" style="position: absolute; width: 165px;
left: 28px; top:
28px; z-index: 100;">
<div class="dropShadow">
<div id="innerDiv">
Hello drag me about
</div>
<div class="dropShadowBottom"></div>
</div>
</div>
Hope this helps someone.
Leon
_______________________________________________
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
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Andrew Tetlaw
2006-Apr-27 10:37 UTC
Re: Prevent IE background image reloading onscriptaculous drag
This is all you need: http://www.fivesevensix.com/studies/ie6flicker/ And get this to avoid the ''flicker'' "The area of an element with a background-image must be at least 2500 pixels." That means a 50x50 pixel element with background image will not ''flicker'' On 27/04/06, Andrzej Rumpfelt <arumpfelt-2InuVDLKURjVItvQsEIGlw@public.gmane.org> wrote:> > Hi, > strange.. I tested it in IE and with the first example it was reloading > images constantly while dragging.. like it had to reload on every position > of this div. > Then I changed the code to your fix and now, while dragging, it''s ok but > when I stop moving the div, then it reloads images.. but why ? > > is there a way to avoid this reloading ? I had this problem before in one of > my app but couldn''t solve it for IE > > greeitngs, > > Andrzej Rumpfelt > > > > ----- Original Message ----- > From: Leon Chevalier > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Sent: Thursday, April 27, 2006 12:12 PM > Subject: [Rails-spinoffs] Prevent IE background image reloading > onscriptaculous drag > > Hi all, > > Just a quick FYI to anyone who may have this problem, as I was writing a > question and then solved it myself. The prob: > > I have a draggable div that uses a dropshadow as follows: > > <script > src="http://demo.script.aculo.us/scripts/prototype.js" > type="text/javascript"></script> > <script > src="http://demo.script.aculo.us/scripts/effects.js" > type="text/javascript"></script> > <script > src="http://demo.script.aculo.us/scripts/dragdrop.js" > type="text/javascript"></script> > <script > src="http://demo.script.aculo.us/scripts/controls.js" > type="text/javascript"></script> > <style type="text/css"> > <!-- > #innerDiv { > cursor:move; > } > > .dropShadow { > padding-right:2px; > background:url(http://www.abomb.co.uk/images/bgr_drop_right_trans.gif) > no-repeat right top; > } > > .dropShadowBottom { > width:100%; > height:2px; > background:url(http://www.abomb.co.uk/images/bgr_drop_bottom_trans.gif) > no-repeat left bottom; > margin-bottom:-2px; > position:relative; > } > --> > </style> > > <div id="dragMe" class="dropShadow" style="position: absolute; width: 165px; > left: 28px; top: 28px; z-index: 100;"> > <div id="innerDiv"> > Hello drag me about > </div> > <div class="dropShadowBottom"></div> > </div> > <script type="text/javascript">new Draggable(''dragMe'')</script> > > Everything is great in Firefox, but in IE the background image re-loads on > drag. Even if you set "Check for newer version of stored pages" to "Never" > the mouse pointer constantly shows re-loading. > > The workaround is to make sure that the element which is draggable doesn''t > have the background image - set the background image to a child div instead: > > <div id="dragMe" style="position: absolute; width: 165px; left: 28px; top: > 28px; z-index: 100;"> > <div class="dropShadow"> > <div id="innerDiv"> > Hello drag me about > </div> > <div class="dropShadowBottom"></div> > </div> > </div> > > Hope this helps someone. > > Leon > > _______________________________________________ > 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 > > >-- Andrew
Leon Chevalier
2006-Apr-27 11:09 UTC
RE: Prevent IE background imagereloadingonscriptaculous drag
________________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Andrzej Rumpfelt Sent: 27 April 2006 12:35 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Prevent IE background imagereloadingonscriptaculous drag follow up to myself.. just noticed it reloads twice.. on start and stop dragging.. greetings, Andrzej Rumpfelt Hi, strange.. I tested it in IE and with the first example it was reloading images constantly while dragging.. like it had to reload on every position of this div. Then I changed the code to your fix and now, while dragging, it''s ok but when I stop moving the div, then it reloads images.. but why ? is there a way to avoid this reloading ? I had this problem before in one of my app but couldn''t solve it for IE greeitngs, Andrzej Rumpfelt ----- Andrzej, Yes you''re right - there is still a small reload most noticeably when the drag stops. I have not been able to prevent this, even using the method here: http://www.fivesevensix.com/studies/ie6flicker/ I *have* been able to use the above method to prevent on-mouseover image flickers, so it seems to me that perhaps another solution is needed. For the time being though, I can live with a small reload on endDrag. Regards, Leon
On 4/26/06, Jeremy Kitchen <kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org> wrote:> Element.setStyle(element, {height: 123});Length in CSS always needs a unit, except for 0. There is no "default unit" of px. Whether using the setStyle wrapper or direct assignment, this has to be "123px".
On Friday 28 April 2006 02:05, Martin Bialasinski wrote:> On 4/26/06, Jeremy Kitchen <kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org> wrote: > > Element.setStyle(element, {height: 123}); > > Length in CSS always needs a unit, except for 0. There is no "default > unit" of px. Whether using the setStyle wrapper or direct assignment, > this has to be "123px".yea, after I posted that I realized I messed up :( -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org http://ipaction.org/ -- defend your rights to fair use _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs