search for: cumulativeoffset

Displaying 20 results from an estimated 24 matches for "cumulativeoffset".

2005 Aug 17
2
CumulativeOffset
...ion 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 the element I''m working with? Cheers, Marty
2008 Apr 22
2
Prototype's cumulativeOffset() is not a function
.../javascript"></script> <script src="my_js_file.js" type="text/javascript"></script> my_js_file.js looks like this: Event.observe(window, ''load'', loadTasks, false); function loadTasks() { var foo = $(''content_menu'').cumulativeOffset()[0]; alert(foo); } And in my html I have <div id="content_menu">blah</div> But when I attempt to load this page, I get a script error. I use Firebug for debugging, and it tells me: "$(''content_menu'').cumulativeOffset is not a function". If I...
2006 Aug 09
0
Position.cumulativeOffset issues?
I have been working on a project that involves a lot of front-end functionality and I noticed that Position.cumulativeOffset was not as accurate as I had expected/needed. I also needed some more options and I just didn''t really like having to type Position.cumulativeOffset all the time. I wanted to simply do element.getOffset() and be done. After lots of time spent going back and forth with the different browse...
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......
2006 May 16
4
Positioning
...e various offset methods. From looking at the code I think I may understand them but I wanted to run it by the group to make sure I had a clear understanding. realOffset - This returns the coordinates of the element as if none of the elements on the page are scrollable from the document edge. cumulativeOffset - This returns the coordinates of the element from the document edge (not taking scrolling into account or anything fancy). positionedOffset - This will return the same thing as cumulativeOffset most of the time, but if the element is contained in a positioned element (''absolute'...
2006 Mar 17
1
Autocompleter.Local problem/desparate plea for help...
...) + "</ul>"; } //end }); // ]]> </script> I did try to make a function that would scroll outside of the Autocompleter, but it doesn''t work based on the fact the auto_complete <div> may not be showing yet: function scrollme(box) { var topItem = Position.cumulativeOffset(box.getEntry(0)); var selItem = Position.cumulativeOffset(box.getEntry (box.index)); box.update.scrollTop=selItem[1]-(topItem[1]+15); } scrollme(box); Please help me!!! Thanks, -Steve _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpI...
2005 Sep 15
4
Scrolling Tables/Divs?
Is anyone working on a scrolling table or div such as the openrico livegrid demo? I''m looking to develop (much like smashbox''s scrolling images) a collection of thumbnails that you can scroll horizontally. I''ve got a non-prototype.js example but I wanted to check to see if anyone was closer than I to this. BTW, I will be finishing up my slider code shortly and
2006 Jan 30
0
Draggable with auto-scroll
...down at all. With the page scrolled down at all, the div with the overflow scrollbar would scroll itself immediately upon a draggble within it being dragged, instead of only when the draggable reached the bottom border of the scrollable div. To fix this, I changed the Position.page to Position.cumulativeOffset and commented out the 2 lines below it where you were adding the scrollLeft and scrollTop values to the p[0] and p[1] values. Now it works just fine. See the new updateDrag function below. Why were you using Position.page? updateDrag: function(event, pointer) { if(!this.dragging) this.star...
2006 Jan 28
4
Unspecified error in prototype.js
...re-register the Sortables, (by the way these pages are called for the first time also using AJAX.Updater) and when I start dragging I get an ''Unspecified Error'' on line 1589 of prototype.js, and error persist, till 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; //--...
2006 Feb 08
2
Prototype: Position.clone()
...any closure trickery going on here, either. I''m surprised to find something like this in what is otherwise beautiful code. clone: function(source, target) { source = $(source); target = $(target); target.style.position = ''absolute''; var offsets = this.cumulativeOffset(source); target.style.top = offsets[1] + ''px''; target.style.left = offsets[0] + ''px''; target.style.width = source.offsetWidth + ''px''; target.style.height = source.offsetHeight + ''px''; }, clone: functi...
2006 Oct 27
16
Returning coordinates of a draggable?
How difficult would it be to get the x and y coordinates returned of a draggable? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to
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"
2007 Jul 31
6
Using Effect.Move() while maintaining the elements DOM order
...DOM function switchPositionsWithDOM(first, second) { var parentElem = first.up(); var secondId = second.id; var s = second.remove(); parentElem.insertBefore(s, first); } // switch positions using Effect.Move function switchPositionsWithMove(first, second) { var delta = Position.cumulativeOffset(first)[1] - Position.cumulativeOffset(second)[1]; new Effect.Fade(first, {from: 1.0, to: 0.3}); new Effect.Fade(second, {from: 1.0, to: 0.3}); new Effect.Move(second, {x: 0, y: delta}); new Effect.Move(first, {x: 0, y: -delta}); new Effect.Appear(second, {from: 0.3, to: 1.0});...
2007 Nov 07
1
draggable with iframeshim for ie6
you all know the problem with select and textbox in ie6 where you need an iframe under your divs so they will visually be on top. does scriptaculous have api for iframeshim like yahoo yui does? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send
2006 Feb 18
0
Move element into view
...wie möglich scrollen, bis das Element sichtbar ist. Effect.ScrollToFullView = Class.create(); Object.extend(Object.extend(Effect.ScrollToFullView.prototype, Effect.ScrollTo.prototype), { setup: function() { Position.prepare(); this.scrollStart = Position.deltaY; var offsets = Position.cumulativeOffset(this.element); var rand = 0; if(this.options.offset) rand = this.options.offset; var element_kante_oben = offsets[1]; var element_hoehe = this.element.offsetHeight; // Länge und Position des dargestellten Ausschnitts relativ zum gesamten Dokument var screen_bottom, screen_...
2005 Aug 10
2
extend question
Is it possible to call the super class''s version of a function from a subclass? SuperClass = Class.create(); SuperClass.prototype = { initialize: function(){ this.varA = ''''; this.varB = ''''; } } SubClass = Class.create(); SubClass.prototype = (new SuperClass()).extend({ initialize: function(somevar) { this.somevar = somevar; }
2005 Aug 28
0
Position.clone and scroll offsets
...bit shaky at times, but I think clone needs to take into account the scroll offsets as shown below. Michael var Position = { ... clone: function(source, target) { source = $(source); target = $(target); target.style.position = ''absolute''; var offsets = this.cumulativeOffset(source); var scrolls = this.realOffset(source); // ### new target.style.top = (offsets[1] - scrolls[1]) + ''px''; target.style.left = (offsets[0] - scrolls[0]) + ''px''; target.style.width = source.offsetWidth + ''px''; targe...
2006 Jan 31
1
Finding Final Position with a Draggable Object
Hello, I have a draggable window. I would like to have it so that when they come back to the page with the draggable window that it remembers where they left it when they last visited. How would I get the final position after the dragging has been stopped? I have been looking threw the wiki and couldn''t find anything.
2005 Dec 14
1
[scriptaculous] scroll down to show full auto completion list (w/ possible patch)
Hi everyone, lately I''ve implemented an auto completion textfield at the bottom of a form. I was a bit bothered by the fact that the user would potentially need to scroll down in order to see all the options offered by the auto completion. I couldn''t find any information on how to auto scroll to the auto completion list with bulit-in functionality so I modified controls.js
2005 Jul 28
2
CSS and autocompleter
hi. I''m rewriting the code from my own save-yourself-if-you-can implementation of xmlhttprequest to scriptaculous autocompleter, and it''s all fine and dandy, except that I am having difficulty positioning the auto_complete div which contains the results returned by xmlhttprequest. the auto_complete div is always stuck in one place, it starts a little below and half