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

Sortable lists

Expand Messages
  • willogibbo
    I ve just started with this toolkit. My first interest is dragdrop and specifically sortable lists. I see in the list.html example use of a file ygDDList.js
    Message 1 of 5 , Feb 15, 2006
    • 0 Attachment
      I've just started with this toolkit. My first interest is dragdrop and
      specifically sortable lists. I see in the list.html example use of a
      file ygDDList.js which presumably has the constructors ygDDList and
      ygDDListBoundary. But I can't find anything on ygDDList or
      ygDDListBoundary in the dragdrop API documentation.

      Where can I find a little explanation of how the sortable lists works?

      Very excited by the potential for this toolset - looks very
      comprehensive.

      Many thanks
      Will
    • Eric Miraglia
      Will, The DDList class is a subclass (in the JS sense) of DDProxy. This example shows how to create specific interactions with the Drag and Drop Utility
      Message 2 of 5 , Feb 15, 2006
      • 0 Attachment
        Will,

        The DDList class is a "subclass" (in the JS sense) of DDProxy. This
        example shows how to create specific interactions with the Drag and
        Drop Utility using subclassing, but the actual subclasses (like
        DDList and DDListBoundary) are not part of the Utility themselves and
        are therefore not in the API.

        If you dig into the code (eg, http://developer.yahoo.net/yui/dragdrop/
        examples/js/ygDDList.js), what I think you'll see is that we've taken
        DDProxy and modified its API methods -- startDrag, endDrag,
        onDragOver and so on to create DDList. That's the model Drag and
        Drop follows for getting from raw dragging to a refined, meaningful
        drag-and-drop transaction. The documentation on some of these
        example implementations is indeed sparse; sorry about that. We're
        just trying to exemplify how the API is put into use to achieve a
        specific effect.

        -Eric


        On Feb 15, 2006, at 11:30 AM, willogibbo wrote:

        > I've just started with this toolkit. My first interest is dragdrop and
        > specifically sortable lists. I see in the list.html example use of a
        > file ygDDList.js which presumably has the constructors ygDDList and
        > ygDDListBoundary. But I can't find anything on ygDDList or
        > ygDDListBoundary in the dragdrop API documentation.
        >
        > Where can I find a little explanation of how the sortable lists works?
        >
        > Very excited by the potential for this toolset - looks very
        > comprehensive.
        >
        > Many thanks
        > Will
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
      • Adam Moore
        ... Will, these are examples showing how you can extend YAHOO.util.DDProxy and YAHOO.util.DDTarget. The classes are not part of the API, so they are not
        Message 3 of 5 , Feb 15, 2006
        • 0 Attachment
          On Wed, Feb 15, 2006 at 07:30:17PM -0000, willogibbo wrote:
          > I've just started with this toolkit. My first interest is dragdrop and
          > specifically sortable lists. I see in the list.html example use of a
          > file ygDDList.js which presumably has the constructors ygDDList and
          > ygDDListBoundary. But I can't find anything on ygDDList or
          > ygDDListBoundary in the dragdrop API documentation.
          >
          > Where can I find a little explanation of how the sortable lists works?

          Will, these are examples showing how you can extend YAHOO.util.DDProxy
          and YAHOO.util.DDTarget. The classes are not part of the API, so they are
          not currently included in the API documentation.

          ygDDList does the following:

          * Changes the default style of the proxy element.

          * Changes the style and content of the proxy element when a drag is
          initiated.

          * When dragging an item over another it checks to see if the cursor is above
          the midpoint of the item. If it is, it swaps the two nodes in the DOM.


          -Adam
        • willogibbo
          Thanks Adam & Eric. I think I m begginning to get a feel. In the sortable lists example I don t understand the argument in ygDDListBoundary( hidden1 ) . I see
          Message 4 of 5 , Feb 15, 2006
          • 0 Attachment
            Thanks Adam & Eric. I think I'm begginning to get a feel.

            In the sortable lists example I don't understand the argument
            in 'ygDDListBoundary("hidden1")'. I see thatsubclass
            ygDDListBoundary (in ygDDList.js) has a line containing 'isBoundary
            = true', but I don't see where 'isBoundary' comes from (cannot see
            this in DDTarget API documentation.) I don't really see how the
            bounded group of potential target elements is set up).

            Any further help on how list example is working would be hugely
            appreciated.

            Thanks again.
            Will



            --- In ydn-javascript@yahoogroups.com, Adam Moore <adamoore@...>
            wrote:
            >
            > On Wed, Feb 15, 2006 at 07:30:17PM -0000, willogibbo wrote:
            > > I've just started with this toolkit. My first interest is
            dragdrop and
            > > specifically sortable lists. I see in the list.html example use
            of a
            > > file ygDDList.js which presumably has the constructors ygDDList
            and
            > > ygDDListBoundary. But I can't find anything on ygDDList or
            > > ygDDListBoundary in the dragdrop API documentation.
            > >
            > > Where can I find a little explanation of how the sortable lists
            works?
            >
            > Will, these are examples showing how you can extend
            YAHOO.util.DDProxy
            > and YAHOO.util.DDTarget. The classes are not part of the API, so
            they are
            > not currently included in the API documentation.
            >
            > ygDDList does the following:
            >
            > * Changes the default style of the proxy element.
            >
            > * Changes the style and content of the proxy element when a drag is
            > initiated.
            >
            > * When dragging an item over another it checks to see if the
            cursor is above
            > the midpoint of the item. If it is, it swaps the two nodes in
            the DOM.
            >
            >
            > -Adam
            >
          • Adam Moore
            ... Hi Will, ygDDListBoundary is a leftover from a time when this example was more complex and I needed a way to know when I was over the last item in the
            Message 5 of 5 , Feb 15, 2006
            • 0 Attachment
              On Wed, Feb 15, 2006 at 09:01:44PM -0000, willogibbo wrote:
              > Thanks Adam & Eric. I think I'm begginning to get a feel.
              >
              > In the sortable lists example I don't understand the argument
              > in 'ygDDListBoundary("hidden1")'. I see thatsubclass
              > ygDDListBoundary (in ygDDList.js) has a line containing 'isBoundary
              > = true', but I don't see where 'isBoundary' comes from (cannot see
              > this in DDTarget API documentation.) I don't really see how the
              > bounded group of potential target elements is set up).

              Hi Will, ygDDListBoundary is a leftover from a time when this example was
              more complex and I needed a way to know when I was over the last item in the
              list. Right now it does nothing at all. I'll fix that before the next
              push. Thanks for pointing it out.


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