Results 1 to 4 of 4

Thread: drag @ drop scaling ignored

  1. #1
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    142
    Vote Rating
    1
      0  

    Default 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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    142
    Vote Rating
    1
      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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •