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

Re: [ydn-javascript] Drag/Drop Constraint Problem (again)

Expand Messages
  • Eric Miraglia
    k2heikkila, We may need more information or a fuller test case to help you on this; have you been able to reduce the case down further where the bug is
    Message 1 of 3 , Jan 2, 2007
    • 0 Attachment
      k2heikkila,

      We may need more information or a fuller test case to help you on this; have you been able to reduce the case down further where the bug is isolated?

      When I do a simple case based on your code, I get the expected behavior (able to drag in all directions):

      <script>
         
              function init()
              {
      var test = new YAHOO.util.DD("div1");
              test.setXConstraint(1000,1000,20);
      test.setYConstraint(1000,1000,20);
               
              }
             
              YAHOO.util.Event.addListener(window, "load", init );
      </script>
      <body>
      <div id="div1" style="position:relative; top:200px; left:200px;">draggable</div>
      </body>
      </html>

      Regards,
      Eric


      ______________________________________________
      Eric Miraglia
      Yahoo! User Interface Library



      On Jan 2, 2007, at 4:32 PM, k2heikkila wrote:

      Sorry for the dup post, but I didn't get any responses back on this,
      and with everyone out on holiday last week...

      I am setting a drag/drop constraint for multiple divs in a page:

      draggableItems[itemId].setXConstraint(1000,1000,gridSize);
      draggableItems[itemId].setYConstraint(1000,1000,gridSize);

      However, after I set the constraint I can no longer drag down or to
      the right, only up and to the left. With the constraint off I can
      drag anywhere on the page.

      Has anyone seen something like this? I'm using version 012.


    • k2heikkila
      Well, my environment is pretty complex and would have been hard to post, so I did some more sleuthing on my own: What was happening is I was passing in a
      Message 2 of 3 , Jan 3, 2007
      • 0 Attachment
        Well, my environment is pretty complex and would have been hard to
        post, so I did some more sleuthing on my own:

        What was happening is I was passing in a string of 50 instead of an
        int. The odd thing is the max/min X/Y properties were getting set
        fine (they are ints), and the arrays of xTicks/yTicks only built up
        half way and then all of a sudden you see a string in the middle of
        the array and it stops. So, my fault, but might be nice to have a bit
        of checking on the yui side for this, as well.

        Thanks for looking into this.

        Kelly


        --- In ydn-javascript@yahoogroups.com, Eric Miraglia <miraglia@...> wrote:
        >
        > k2heikkila,
        >
        > We may need more information or a fuller test case to help you on
        > this; have you been able to reduce the case down further where the
        > bug is isolated?
        >
        > When I do a simple case based on your code, I get the expected
        > behavior (able to drag in all directions):
        >
        > <script>
        >
        > function init()
        > {
        >
        > var test = new YAHOO.util.DD("div1");
        >
        > test.setXConstraint(1000,1000,20);
        > test.setYConstraint(1000,1000,20);
        >
        > }
        >
        > YAHOO.util.Event.addListener(window, "load", init );
        > </script>
        > <body>
        > <div id="div1" style="position:relative; top:200px; left:
        > 200px;">draggable</div>
        > </body>
        > </html>
        >
        > Regards,
        > Eric
        >
        >
        > ______________________________________________
        > Eric Miraglia
        > Yahoo! User Interface Library
        >
        >
        >
        > On Jan 2, 2007, at 4:32 PM, k2heikkila wrote:
        >
        > > Sorry for the dup post, but I didn't get any responses back on this,
        > > and with everyone out on holiday last week...
        > >
        > > I am setting a drag/drop constraint for multiple divs in a page:
        > >
        > > draggableItems[itemId].setXConstraint(1000,1000,gridSize);
        > > draggableItems[itemId].setYConstraint(1000,1000,gridSize);
        > >
        > > However, after I set the constraint I can no longer drag down or to
        > > the right, only up and to the left. With the constraint off I can
        > > drag anywhere on the page.
        > >
        > > Has anyone seen something like this? I'm using version 012.
        > >
        > >
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.