1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    80
    Vote Rating
    0
    Slapyo is on a distinguished road

      0  

    Default resizable with draggable using constrainTo?

    resizable with draggable using constrainTo?


    How would I go about using the resizable component with draggable set to true but also be able to tell it to constrain to a parent element?

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    You can manually initialize the DD pretty easily.

    (see YAHOO.ext.Element.initDD)

    resizer.el.initDD(...).constrainTo(...);

  3. #3
    Sencha User mxracer's Avatar
    Join Date
    Apr 2007
    Location
    Napoleon, OH
    Posts
    299
    Vote Rating
    0
    mxracer is on a distinguished road

      0  

    Default Possible Bug with resizable when using constrainTo

    Possible Bug with resizable when using constrainTo


    I am playing around with a resizable image (that is draggable) and having it constrained to a container element.

    If you goto this link: http://www.qwikioffice.com/resizable/test.html
    you will notice the following:

    1.) When the page loads you can drag the image around, and it is constrained to the container (light grey backround).

    2.) But if you resize the image and then drag it around the container, you can see that the constraint is tied to the original dimensions of the image.

    Is This a possible bug? If not... how can keep the image properly constrained within the container during and after a resize?

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    464
    Vote Rating
    1
    JorisA is on a distinguished road

      0  

    Default


    Hi mxracer. I'm interested in your solution, any chance you can fix the link?

  5. #5
    Sencha User mxracer's Avatar
    Join Date
    Apr 2007
    Location
    Napoleon, OH
    Posts
    299
    Vote Rating
    0
    mxracer is on a distinguished road

      0  

    Default


    Here are the urls to 2 working test pages.

    http://www.qwikioffice.com/forum-exa...inTo-test.html
    http://www.qwikioffice.com/forum-exa...tion-Test.html

    NOTE:
    These currently only work with version 1.0 of Ext. There is a bug in versions 1.0.1 and 1.0.1a that I am told is fixed in svn but won't be available to the general public until the next release.

Similar Threads

  1. BasicDialog not draggable
    By Animal in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 22 Feb 2007, 3:14 AM
  2. text wraps in IE7 with constrainTo
    By Slapyo in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 28 Nov 2006, 8:59 PM
  3. constrainTo problem?
    By Slapyo in forum Ext 1.x: Bugs
    Replies: 3
    Last Post: 28 Nov 2006, 4:24 PM
  4. TextArea Draggable
    By faizur in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 27 Nov 2006, 10:49 AM
  5. Dialog not draggable after animation
    By mambo in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 25 Oct 2006, 4:06 PM

Thread Participants: 3