2 Replies Latest reply on Mar 25, 2015 3:12 PM by emmanuel cambier

    Change an object's size by the user changing this object's Y position

    emmanuel cambier

      Change an object's size by the user changing this object's Y position

        • 1. Re: Change an object's size by the user changing this object's Y position
          resdesign Adobe Community Professional & MVP

          Give us more context on what you want to do.

          You can get the size of any element using width() and height()

          You can find the position of an object with offset()

          You can use animate() with width, height, top and left.

          Note that you need jquery.

          • 2. Re: Change an object's size by the user changing this object's Y position
            emmanuel cambier Level 1

            Hi there, thank you for the answer.

             

            Let me explain the context:

             

            The user must be able to drag a cushion and drop it on a sofa, then grab as many cushion as he desire and rearrange them freely.

             

            Using jquery, I want a set of items (around 7 pictures) displayed at the bottom of the stage with their size reduced to vignettes, and when the user drag and drop them on a target higher on the stage, the pictures should be displayed full size.

             

            Problem n°1, I need to have only one large target for all items and the user must be able to drop any item in the target. I have been struggling all day to have my droppable target to accept multiple items but I am not efficient enough to do this.

            So I thought by giving up the target and having the items scale to full size when the user drag them up the stage past a certain point, this may work.

            Problem n°2, I am not efficient for this either (yes I do feel like a dork )

             

            The first solution would be best since I could easily have the items (symbols) start playing an animation once they are dropped.

             

            An other issue is that I need to have the user able to pick at least 3 instances of the same item for each item, and this instances need to be stacked exactly on top of another in order to appear like there is only one item.

             

            Also please note the navigation at the very bottom which should allow the user to swipe on the ipad to navigate  horizontally between different collections of cushions, the name of the collection changing depending on which collection the middle cushion belongs to.

             

            I fully realize this may be quite a bit of work, feel free to contact me at info(at)ecmp-prod.com

             

             

            Regards,

            Emmanuel

             

            test_coussins.jpg