Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha - Community Support Team
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    0
    meyerovb is on a distinguished road

      0  

    Default [FIXED-192] Disabling drag does not allow pinch to function

    [FIXED-192] Disabling drag does not allow pinch to function


    Disabling the draggable only detaches the tapEvent, not the touchmove or touchend events. In the below example, you can drag the box, clicking Broken disables the drag but you still cannot pinch resize the box. Click Works and the drag is correctly disabled and you can pinch-resize the box.

    Code:
    <html>
    <head>
        <title></title>
        <link href="/css/ext-touch.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/js/sencha/ext-touch-debug.js"></script>
        <script type="text/javascript">
            Ext.setup({ onReady: function () {
                Ext.fly('panel').on({
                    scope: { scale: 1 },
                    pinchstart: function () { this.startScale = this.scale; },
                    pinch: function (e, t) {
                        this.scale = e.scale * this.startScale;
                        t.style.webkitTransform = 'scale(' + this.scale + ')';
                    }
                });
                window.drag = new Ext.util.Draggable('panel');
            }
            });
            
            function disableDrag() {
                drag.el.un('touchmove', drag.onTouchMove, drag);
                drag.el.un('touchend', drag.onTouchEnd, drag);
            }
        </script>
    </head>
    <body>
        <div id="panel" style="background-color: #ddd; width: 200px; height: 200px; 
                                position: absolute; left: 100px;">
        </div>
        <a href="javascript:drag.disable();">Broken</a><br /><br />
        <a href="javascript:disableDrag();">Works</a>
    </body>
    </html>

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    That you for the report.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    9
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    This is fixed in the refactored Gesture system and will be included in the next release.

Similar Threads

  1. Example touch events: tap, tapstart, tapmove, doubletab, drag and pinch
    By mrsunshine in forum Sencha Touch 1.x: Examples and Showcases
    Replies: 8
    Last Post: 21 Aug 2012, 2:51 AM
  2. Replies: 1
    Last Post: 29 Jul 2010, 7:30 PM
  3. Pinch and Drag / Off-screen
    By uxdan in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 23 Jul 2010, 6:51 AM
  4. Replies: 48
    Last Post: 6 Dec 2009, 12:22 PM
  5. Replies: 7
    Last Post: 15 Feb 2009, 7:15 PM

Thread Participants: 2