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

positioning overlay

Expand Messages
  • Keith Frank
    Is there a way to position an overlay relative to its context element, Not just aligning the various corners(tr, tl, br, bl) ? For instatnce if I set an
    Message 1 of 7 , Nov 6, 2007
    • 0 Attachment
      Is there a way to position an overlay relative to its context element,
      Not just aligning the various corners(tr, tl, br, bl) ?

      For instatnce if I set an overlays context element can I then position
      the overlay 10 pixels down and 10 pixels to the left of that point. It
      seems like setting the overlays x and y properties only allow you to
      set a position relative to a page.

      Any help would be appreciated,
      Keith
    • someguynameddylan
      Absolutely, Here s 1 way 1. set the context element 2. get your xy configuration attribute 3. add 10 to the x value, then 10 to the y value 4. set your xy
      Message 2 of 7 , Nov 7, 2007
      • 0 Attachment
        Absolutely,

        Here's 1 way

        1. set the context element
        2. get your xy configuration attribute
        3. add 10 to the x value, then 10 to the y value
        4. set your xy configuration

        For example on the panel example here:
        http://developer.yahoo.com/yui/examples/container/overlay.html

        do this:
        var o3 = YAHOO.example.container.overlay3
        var xy = o3.cfg.getProperty('xy');
        xy[0] += 10;
        xy[1] += 10;
        o3.cfg.setProperty('xy', xy);

        regards,

        Dylan


        --- In ydn-javascript@yahoogroups.com, "Keith Frank"
        <keith_expotv@...> wrote:
        >
        > Is there a way to position an overlay relative to its context element,
        > Not just aligning the various corners(tr, tl, br, bl) ?
        >
        > For instatnce if I set an overlays context element can I then position
        > the overlay 10 pixels down and 10 pixels to the left of that point. It
        > seems like setting the overlays x and y properties only allow you to
        > set a position relative to a page.
        >
        > Any help would be appreciated,
        > Keith
        >
      • Keith Frank
        Thanks Dylan, I was leaning towards that solution... was hoping there might be a moveBy(x,y) method that I was missing. Thanks for the clear, concise response!
        Message 3 of 7 , Nov 7, 2007
        • 0 Attachment
          Thanks Dylan,

          I was leaning towards that solution... was hoping there might be a
          moveBy(x,y) method that I was missing.
          Thanks for the clear, concise response!
          Keith


          --- In ydn-javascript@yahoogroups.com, "someguynameddylan"
          <DylanTheDeveloper@...> wrote:
          >
          > Absolutely,
          >
          > Here's 1 way
          >
          > 1. set the context element
          > 2. get your xy configuration attribute
          > 3. add 10 to the x value, then 10 to the y value
          > 4. set your xy configuration
          >
          > For example on the panel example here:
          > http://developer.yahoo.com/yui/examples/container/overlay.html
          >
          > do this:
          > var o3 = YAHOO.example.container.overlay3
          > var xy = o3.cfg.getProperty('xy');
          > xy[0] += 10;
          > xy[1] += 10;
          > o3.cfg.setProperty('xy', xy);
          >
          > regards,
          >
          > Dylan
          >
          >
          > --- In ydn-javascript@yahoogroups.com, "Keith Frank"
          > <keith_expotv@> wrote:
          > >
          > > Is there a way to position an overlay relative to its context element,
          > > Not just aligning the various corners(tr, tl, br, bl) ?
          > >
          > > For instatnce if I set an overlays context element can I then position
          > > the overlay 10 pixels down and 10 pixels to the left of that point. It
          > > seems like setting the overlays x and y properties only allow you to
          > > set a position relative to a page.
          > >
          > > Any help would be appreciated,
          > > Keith
          > >
          >
        • someguynameddylan
          there certainly could be a moveto method, check the api docs. ... element, ... position ... point. It
          Message 4 of 7 , Nov 7, 2007
          • 0 Attachment
            there certainly could be a moveto method, check the api docs.

            --- In ydn-javascript@yahoogroups.com, "Keith Frank"
            <keith_expotv@...> wrote:
            >
            > Thanks Dylan,
            >
            > I was leaning towards that solution... was hoping there might be a
            > moveBy(x,y) method that I was missing.
            > Thanks for the clear, concise response!
            > Keith
            >
            >
            > --- In ydn-javascript@yahoogroups.com, "someguynameddylan"
            > <DylanTheDeveloper@> wrote:
            > >
            > > Absolutely,
            > >
            > > Here's 1 way
            > >
            > > 1. set the context element
            > > 2. get your xy configuration attribute
            > > 3. add 10 to the x value, then 10 to the y value
            > > 4. set your xy configuration
            > >
            > > For example on the panel example here:
            > > http://developer.yahoo.com/yui/examples/container/overlay.html
            > >
            > > do this:
            > > var o3 = YAHOO.example.container.overlay3
            > > var xy = o3.cfg.getProperty('xy');
            > > xy[0] += 10;
            > > xy[1] += 10;
            > > o3.cfg.setProperty('xy', xy);
            > >
            > > regards,
            > >
            > > Dylan
            > >
            > >
            > > --- In ydn-javascript@yahoogroups.com, "Keith Frank"
            > > <keith_expotv@> wrote:
            > > >
            > > > Is there a way to position an overlay relative to its context
            element,
            > > > Not just aligning the various corners(tr, tl, br, bl) ?
            > > >
            > > > For instatnce if I set an overlays context element can I then
            position
            > > > the overlay 10 pixels down and 10 pixels to the left of that
            point. It
            > > > seems like setting the overlays x and y properties only allow you to
            > > > set a position relative to a page.
            > > >
            > > > Any help would be appreciated,
            > > > Keith
            > > >
            > >
            >
          • daniele@mentegrafica.it
            dott. daniele galiffa infovis designer and developer Macromedia FlashMX Developer Certified www.mentegrafica.it/infovis
            Message 5 of 7 , Nov 8, 2007
            • 0 Attachment
              dott. daniele galiffa
              infovis designer and developer
              Macromedia FlashMX Developer Certified

              www.mentegrafica.it/infovis

              http://www.linkedin.com/in/danielegaliffa

              mobile: +39 335 57 53 078
              email: daniele@...
              MSN: danielegaliffa@...
              Skype: danielegaliffa

              -- original message --
              Subject: [ydn-javascript] Re: positioning overlay
              From: "someguynameddylan" <DylanTheDeveloper@...>
              Date: 07/11/2007 18:03

              Absolutely,

              Here's 1 way

              1. set the context element
              2. get your xy configuration attribute
              3. add 10 to the x value, then 10 to the y value
              4. set your xy configuration

              For example on the panel example here:
              http://developer.yahoo.com/yui/examples/container/overlay.html

              do this:
              var o3 = YAHOO.example.container.overlay3
              var xy = o3.cfg.getProperty('xy');
              xy[0] += 10;
              xy[1] += 10;
              o3.cfg.setProperty('xy', xy);

              regards,

              Dylan


              --- In ydn-javascript@yahoogroups.com, "Keith Frank"
              <keith_expotv@...> wrote:
              >
              > Is there a way to position an overlay relative to its context element,
              > Not just aligning the various corners(tr, tl, br, bl) ?
              >
              > For instatnce if I set an overlays context element can I then position
              > the overlay 10 pixels down and 10 pixels to the left of that point. It
              > seems like setting the overlays x and y properties only allow you to
              > set a position relative to a page.
              >
              > Any help would be appreciated,
              > Keith
              >





              Yahoo! Groups Links
            • wei_sadie
              I m trying to position an overlay using the method described below, but I m having trouble getting the x and y properties. They remain undefined until after
              Message 6 of 7 , Dec 17, 2007
              • 0 Attachment
                I'm trying to position an overlay using the method described below,
                but I'm having trouble getting the x and y properties. They remain
                undefined until after you render the panel and I can't seem to change
                them once the panel is rendered. Any ideas in what step I am missing?

                YAHOO.login = new YAHOO.widget.Panel("login", {
                context:["div3","br","tr"], width:"200px", visible:false,
                constraintoviewport:true } );
                var y = YAHOO.login.cfg.getProperty('y');
                y -= 100;
                YAHOO.login.cfg.setProperty('y', y);
                YAHOO.login.render();

                Thanks!


                --- In ydn-javascript@yahoogroups.com, "someguynameddylan"
                <DylanTheDeveloper@...> wrote:
                >
                > Absolutely,
                >
                > Here's 1 way
                >
                > 1. set the context element
                > 2. get your xy configuration attribute
                > 3. add 10 to the x value, then 10 to the y value
                > 4. set your xy configuration
                >
                > For example on the panel example here:
                > http://developer.yahoo.com/yui/examples/container/overlay.html
                >
                > do this:
                > var o3 = YAHOO.example.container.overlay3
                > var xy = o3.cfg.getProperty('xy');
                > xy[0] += 10;
                > xy[1] += 10;
                > o3.cfg.setProperty('xy', xy);
                >
                > regards,
                >
                > Dylan
                >
                >
                > --- In ydn-javascript@yahoogroups.com, "Keith Frank"
                > <keith_expotv@> wrote:
                > >
                > > Is there a way to position an overlay relative to its context element,
                > > Not just aligning the various corners(tr, tl, br, bl) ?
                > >
                > > For instatnce if I set an overlays context element can I then position
                > > the overlay 10 pixels down and 10 pixels to the left of that point. It
                > > seems like setting the overlays x and y properties only allow you to
                > > set a position relative to a page.
                > >
                > > Any help would be appreciated,
                > > Keith
                > >
                >
              • Satyen Desai
                Hi, You will need to render to get an XY value set ( the initial queued configuration parameters for Containers are applied after render, and hence the y value
                Message 7 of 7 , Dec 20, 2007
                • 0 Attachment

                  Hi,

                  You will need to render to get an XY value set ( the initial queued configuration parameters for Containers are applied after render, and hence the y value will be set once the context value is processed ).

                   

                  However you should be able to set XY after render. Here’s an example based on your snippet (moved to 2.4.1, but works on 2.4.0 also):

                   

                  http://yuiblog.com/sandbox/yui/v241/examples/container/positionRender.html

                   

                  Is there something different about your page?

                   

                  Regards,

                  - Satyen

                   


                  From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of wei_sadie
                  Sent: Monday, December 17, 2007 9:49 PM
                  To: ydn-javascript@yahoogroups.com
                  Subject: [ydn-javascript] Re: positioning overlay

                   


                  I'm trying to position an overlay using the method described below,
                  but I'm having trouble getting the x and y properties. They remain
                  undefined until after you render the panel and I can't seem to change
                  them once the panel is rendered. Any ideas in what step I am missing?

                  YAHOO.login = new YAHOO.widget. Panel("login" , {
                  context:["div3" ,"br","tr" ], width:"200px" , visible:false,
                  constraintoviewport :true } );
                  var y = YAHOO.login. cfg.getProperty( 'y');
                  y -= 100;
                  YAHOO.login. cfg.setProperty( 'y', y);
                  YAHOO.login. render();

                  Thanks!

                  --- In ydn-javascript@ yahoogroups. com, "someguynameddylan"
                  <DylanTheDeveloper@ ...> wrote:

                  >
                  > Absolutely,
                  >
                  > Here's 1 way
                  >
                  > 1. set the context element
                  > 2. get your xy configuration attribute
                  > 3. add 10 to the x value, then 10 to the y value
                  > 4. set your xy configuration
                  >
                  > For example on the panel example here:
                  > http://developer. yahoo.com/ yui/examples/ container/ overlay.html
                  >
                  > do this:
                  > var o3 = YAHOO.example. container. overlay3
                  > var xy = o3.cfg.getProperty( 'xy');
                  > xy[0] += 10;
                  > xy[1] += 10;
                  > o3.cfg.setProperty( 'xy', xy);
                  >
                  > regards,
                  >
                  > Dylan
                  >
                  >
                  > --- In ydn-javascript@ yahoogroups. com,
                  "Keith Frank"
                  > <keith_expotv@ > wrote:
                  > >
                  > > Is there a way to position an overlay relative to its context
                  element,
                  > > Not just aligning the various corners(tr, tl, br, bl) ?
                  > >
                  > > For instatnce if I set an overlays context element can I then
                  position
                  > > the overlay 10 pixels down and 10 pixels to the left of that point.
                  It
                  > > seems like setting the overlays x and y properties only allow you to
                  > > set a position relative to a page.
                  > >
                  > > Any help would be appreciated,
                  > > Keith
                  > >
                  >

                Your message has been successfully submitted and would be delivered to recipients shortly.