Displaying 17 results from an estimated 17 matches for "offsetleft".
2006 Feb 08
2
Prototype: Position.clone()
...th + ''px'';
target.style.height = source.offsetHeight + ''px'';
},
clone: function(source, target) {
var options = Object.extend({
setLeft: true,
setTop: true,
setWidth: true,
setHeight: true,
offsetTop: 0,
offsetLeft: 0
}, arguments[2] || {})
// find page position of source
source = $(source);
var p = Position.page(source);
// find coordinate system to use
target = $(target);
var delta = [0, 0];
var parent = null;
// delta [0,0] will do fine with position: fixed elements,...
2006 Feb 21
7
non simultaneous effects
Hi all,
If I call this function bla:
function bla() {
Effect.Appear('some_element');
Effect.Appear('some_other_element');
}
Both effect happen at the same time. Is there a way to stop this from
happening? I mean, how can I delay the effect on 'some_other_element'
from happening until the effect on 'some_element' is finished?
thanks and regards,
Jeroen
2005 Aug 17
2
CumulativeOffset
Hey All,
I have a fairly basic question about the prototype.js library. First,
I''ve been looking for documentation on this and I have yet to find it.
If any of you know of any, please let me know. Since I''m new to both
the scriptaculous and prototype libraries could someone explain why I
would want to use the cumulativeOffset method and not to just grab the
offset off
2005 Jul 01
1
drag problem
Hi - my first post here so first of all can I say how impressed I am
with this library
Now to my first question - I''m simply trying to make a div draggable,
here''s my test page:
http://localhost:85/folio11.co.uk/js_tech_demo/scriptalicious_test.html
what seems to be happening is that the first drag works fine, but on
subsequent drags the div''s initial coordinates
2005 Jun 23
0
dragdrop library
...this.content = $(content);
Droppables.add(this.content, {
accept: ''fe'',
onDrop: function(element) {
window.status = ''Moved '' + element.alt + '' within content.'';
}
});
//this.limit_left = this.content.offsetLeft;
//this.limit_top = this.content.offsetTop;
//var parent = this.content.offsetParent;
//while (parent != null) {
// this.limit_left += parent.offsetLeft;
// this.limit_top += parent.offsetTop;
// parent = parent.offsetParent;
//}
// TODO: Add event listener for screen resize...
2006 Jan 28
4
Unspecified error in prototype.js
...l I hit escape or refresh the page again.
1584. cumulativeOffset: function(element) {
1585. var valueT = 0, valueL = 0;
1586. do {
1587. valueT += element.offsetTop || 0;
1588. valueL += element.offsetLeft || 0;
1589. element = element.offsetParent; //----------->
This line throws the error.
1590. } while (element);
1591. return [valueL, valueT];
1592. },
Can anyone help me with this issue? I took the latest...
2008 May 30
1
Drag and Drop with scriptaculous
...a Draggables I want to center the Draggables inside the
Droppable.
And here I get my first problems:-(
I use this code:
Droppables.add( ''pos_2'' , {
onDrop: function( element, target )
{
target.highlight();
element.absolutize();
new Effect.Move( element, { x: target.offsetLeft, y:
target.offsetTop, mode: ''absolute'' } );
}
});
When I do this, it seams to work fine, but:
After the "element.absolutize();" the element is moved behind the
target. It seams that the z-index changed. I tried to change the z-
index on the element, but without luck....
2005 Dec 15
1
Some handy methods - perhaps cool enough to be committed some time
...return this.position.x;
}
}
}
/******************************************************
* Geometric functions
******************************************************/
Object.extend(Element, {
getPosition: function(element) {
element=$(element);
var left=element.offsetLeft,top=element.offsetTop;
while (element.offsetParent.tagName != "BODY") {
element = element.offsetParent;
left += element.offsetLeft;
top += element.offsetTop;
}
return new Geometry.Position(left,top);
},
setPosition:functi...
2006 Apr 08
0
MSN like blind - BottomToTop
...top'',''left'',''width'',''height'',''fontSize''].each( function(k) {
this.originalStyle[k] = this.element.style[k];
}.bind(this));
this.originalTop = this.element.offsetTop;
this.originalLeft = this.element.offsetLeft;
this.originalHeight = this.element.offsetHeight;
this.originalWidth = this.element.offsetWidth;
this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
this.dims = null;
if(this.options.scaleMode==''box'')
this.dims = [this.element.offsetHeig...
2008 Jul 01
4
Positioning Oddities
I''m having some trouble using Element#cumulativeOffset and
Element#cumulativeScrollOffset to absolutely position an element right
under a link in certain browsers.
I made a couple of tests to illustrate the issue, which can be found
here: http://www.jeffreykeen.com/sandbox/position.
But in summary, I''ve found two cases which seem to be problematic.
1. If the link has a
2005 Aug 15
6
setting position for draggables?
Hi list,
how can I set the top and left CSS properties for draggable divs? When I modify the properties directly, the DIV jumps to its old position when I start to drag it.
Thanks in advance!
Martin
_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail k?nnen Sie eine SMS an alle
Freunde gleichzeitig schicken:
2005 Nov 04
19
Drag & Scroll
When using drag and drop, the browser window will not scroll if you move the mouse off the page. This makes it very difficult, if not impossible to create certain types of web applications.
I know this has been mentioned before and is on the Wish List, but it''s very frustrating.
If you look at this other Javascript library called "Drag''nDrop & DHTML Library"
2006 Apr 25
12
RE: 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:
2006 Nov 28
11
Extending Element with getTop, getWidth, getLeft problem
...op += element.offsetTop
element = element.offsetParent;
}
}
else if (element.y)
curtop += element.y;
return curtop;
},
getLeft: function(element) {
element = $(element);
var curleft = 0;
if (element.offsetParent) {
while (element.offsetParent) {
curleft += element.offsetLeft
element = element.offsetParent;
}
}
else if (element.x)
curleft += element.x;
return curleft;
}
});
----------------------------------------------------
I''ve done this thinking that I could use this function like this :
$(this).getTop();
But the only way to access the f...
2005 Sep 29
14
Draggables and overflow div''s revisited
I have two scrollable div''s (overflow:auto), one with
a list of elements (the source) and the other is the
drop target (dest).
I''ve enabled ghosting so that the drag element gets
out of the scrollable box (good).
Interesting, at least on Firefox, the ghosted drag
ends up going ''under'' the destination div when I drag
it. No amount of z-order fidding seems to
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...ontext, when an
// element is position relative but top and left have not been defined
- if (window.opera) {
+ if (Prototype.Browser.Opera) {
element.style.top = 0;
element.style.left = 0;
}
@@ -2002,9 +2024,9 @@ Element.Methods = {
valueL += element.offsetLeft || 0;
element = element.offsetParent;
if (element) {
- if (element.tagName == 'BODY') break;
+ if (element.tagName.toUpperCase() == 'BODY') break;
var p = Element.getStyle(element, 'position');
- if (p == 'relative' || p ==...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply
to this email, as some of the replaced lines are too long, so git
won't let me send the email. However, there is nothing wrong with
that patch, and it should be applied in the sequence listed below.
Note also that I assume this will be tested on a clean f11 install, rather
than an upgrade of an existing ovirt server