search for: offsetpar

Displaying 11 results from an estimated 11 matches for "offsetpar".

Did you mean: offsetptr
2006 Feb 08
2
Prototype: Position.clone()
...// 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, // position:absolute needs offsetParent deltas if (Element.getStyle(target,''position'') == ''absolute'') { parent = Position.offsetParent(target); delta = Position.page(parent); } // correct by body offsets (fixes Safari) if (parent == document.body) { delta[0] -= doc...
2006 Jan 28
4
Unspecified error in prototype.js
...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 version of dragdrop.js from SVN, cos I read some articles abou...
2006 Nov 28
11
Extending Element with getTop, getWidth, getLeft problem
...d loaded it after the prototype.js . ---------------------------------------------------- Object.extend(Element, { getWidth: function(element) { element = $(element); return element.offsetWidth; }, getTop: function(element) { element = $(element); var curtop = 0; if (element.offsetParent) { while (element.offsetParent) { curtop += 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...
2005 Jun 23
0
dragdrop library
...t: ''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 }, // make sure the draggable element doesn''t leave the confines o...
2005 Dec 15
1
Some handy methods - perhaps cool enough to be committed some time
...************************************************ * 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:function(element,pos){ element=$(element); ele...
2005 Sep 09
0
cumulativeOffset problem with dynamically loaded elements
I have a page where I am replacing a table element after the page has loaded. I get an error (on ie 6) when prototype.js calls cumulativeOffset. For the new table element, requesting the element.offsetParent property results in an "unspecified error" that brings my whole page to a crashing halt. Does anyone have any ideas or suggestions? Thanks, Cathy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails-spinoffs/att...
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...ion 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 == 'absolute') break; + if (...
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"
2005 Dec 28
6
Sudden Javascript Console noise in firefox
I have been using the latest version of Firefox and Scriptaculous for about a week now, with no problems. Now I get a lot of noise in the javascript console out of the blue: http://img481.imageshack.us/img481/7913/screen4nt.jpg -- ============================ Brian Peiris Brampton, Ontario, Canada brianpeiris-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or
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
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