Loading ...
Sorry, an error occurred while loading the content.

Re: Constant Position Panel

Expand Messages
  • fstoflegend
    Hi Todd! Thanks for the link. It works perfectly now! Is this a feature that will be considered for overlays as a one stop function, sort of like the context
    Message 1 of 6 , Mar 12 10:26 PM
    • 0 Attachment
      Hi Todd!

      Thanks for the link. It works perfectly now!

      Is this a feature that will be considered for overlays as a one stop
      function, sort of like the context property, but maybe add a
      "viewport" instead of just HTMLelements?

      --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
      >
      > "fstoflegend" -
      >
      > Here you go:
      >
      > http://yuiblog.com/sandbox/yui/v220/examples/container/example06.php
      >
      > - Todd
      >
      > ----- Original Message ----
      > From: fstoflegend <arthurchang@...>
      > To: ydn-javascript@yahoogroups.com
      > Sent: Saturday, March 10, 2007 10:00:09 PM
      > Subject: [ydn-javascript] Re: Constant Position Panel
      >
      > The trick is to "calculate the bottom and right positions".
      >
      > How do you do this part? getDocumentHeight/Width just gives you the
      > ENITRE page's height and width, not how far down you've scrolled etc.
      > How would you know?
      >
      > I did getViewportWidth/Height, but that still doesn't give you how far
      > you've scrolled.
      >
      > I think we're missing a big piece of information, the offset of the
      > height / width of the viewport from the top of the document.
      >
      > Anybody know how to get this "offset" ?
      >
      > --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@> wrote:
      > >
      > > "djszenokev" -
      > >
      > > I would look at using the "getDocumentHeight" and
      > > "getDocumentWidth" methods of the DOM utility to
      > > calculate the bottom and right positions of the
      > > browser's viewport. Once you have those two values,
      > > subtract the height and width of your panel and then
      > > pass those values to the panel's "xy" configuration
      > > property. You'll then want to subscribe to the
      > > Overlay's "windowResizeEvent" and "windowScrollEvent"
      > > Custom Events so that you can reposition the panel if
      > > the user scrolls or resizes the browser window. Here
      > > are some API links for you:
      > >
      > > YAHOO.widget.Overlay.windowResizeEvent
      > >
      >
      http://developer.yahoo.com/yui/docs/YAHOO.widget.Overlay.html#YAHOO.widget.Overlay.windowResizeEvent
      > >
      > > YAHOO.widget.Overlay.windowScrollEvent
      > >
      >
      http://developer.yahoo.com/yui/docs/YAHOO.widget.Overlay.html#YAHOO.widget.Overlay.windowScrollEvent
      > >
      > > getDocumentHeight
      > >
      >
      http://developer.yahoo.com/yui/docs/YAHOO.util.Dom.html#getDocumentHeight
      > >
      > > getDocumentWidth
      > >
      http://developer.yahoo.com/yui/docs/YAHOO.util.Dom.html#getDocumentWidth
      > >
      > >
      > > - Todd
      > >
      > > --- djszenokev <djszenokev@> wrote:
      > >
      > > > I'm trying to make a floating Panel, constantly
      > > > situated at the same
      > > > position (in my case, bottom right corner) of the
      > > > browser window, even
      > > > if I scroll down or up.
      > > >
      > > > Its annoying but I really need it for my
      > > > application.
      > > >
      > > > The only thing I can do right now is to place it
      > > > constantly in the
      > > > middle with fixedcenter but that's not the position
      > > > i want.
      > > >
      > > >
      > > >
      > > >
      > > > Yahoo! Groups Links
      > > >
      > > > (Yahoo! ID required)
      > > >
      > > > mailto:ydn-javascript-fullfeatured@yahoogroups.com
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.