1. #1
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    142
    Vote Rating
    1
    jmcfet is on a distinguished road

      0  

    Default Unanswered: drag @ drop scaling ignored

    Unanswered: drag @ drop scaling ignored


    Dag and drop is an issue with touch but is not bad if you can scale the item to be dragged and moved then restore when dropped as Word for Friends does.Of course this is easy in native HTML5 with one line of code:

    img.addEventListener("touchend", function (event) {

    img.style["WebkitTransform"] = "scale(3.0)";

    however when I do the same in Sencha the transform is initially applied then ignored, my code looks like:

    onDragStart: function (draggable,e) {

    draggable.getElement().dom.style.webkitTransform = 'scale(3.0)';

    },

    wonder if I am missing something, Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I haven't used the draggable in a while but I'm sure it uses transforms. Inspect the DOM while dragging will show what's going on with that.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    142
    Vote Rating
    1
    jmcfet is on a distinguished road

      0  

    Default


    not sure how to view the dom for an element while it is moving but would love to know how! Regardless the answer is academic as if a transform is applied to the object when the drag process starts then it should be added to any transforms the framework applies , else it is a bug!

    the behavior is quite useful as a visual aid to what is being dragged

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can have two different styles for the same rule so if both are using the same rule then last one wins. That is what I am thinking could be happening.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1