Results 1 to 2 of 2

Thread: Draggable Sprite Doesn't Follow Cursor

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-4076 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    St Louis,MO
    Posts
    267

    Default Draggable Sprite Doesn't Follow Cursor

    REQUIRED INFORMATION

    Ext version tested:

    • Ext 4.0 rev 5
    Browser versions tested against:
    • Chrome 13.0.782.107 m
    • IE 8, 9
    • FF3
    Description:
    • Draggable sprite does not follow cursor
    Steps to reproduce the problem:
    • Run the included code
    • Click on the red circle sprite and drag it
    The result that was expected:
    • Sprite follows cursor
    The result that occurs instead:
    • Sprite gets further away from cursor the further away it is from the origin
    • On IE8 the sprite immeiately jumps away from the cursor signficantly
    Test Case:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html>
       <
    head>
          <
    title id="page-title">Bug Example</title>
          <
    link rel="stylesheet" type="text/css" href="/js/extjs-nls/resources/css/ext-all.css" />
          
          <
    script type="text/javascript" src="/js/extjs-nls/ext-all-debug.js"></script> 

          <script type="text/javascript">
             Ext.onReady (function () {
                var dc = Ext.create ('Ext.draw.Component', {
                   region: 'center',
                   viewBox: true,
                   items: [
                      { type: 'rect', fill: '#1111cc', x: 0, y: 0, width: 1000, height: 1000 },
                      { id: 'circle', type: 'circle', fill: '#cc1111', x: 80, y: 80, radius: 5, width: 10, height: 10, listeners: { render: function (sprite) {
                                sprite.initDraggable ();
                            } } }
                   ]
                });

                var vp = Ext.create ('Ext.container.Viewport', {
                   layout: 'border',
                   renderTo: Ext.getBody (),
                   items: [ dc ]
                });
             });
          </script>
       </head>
       <body>
       </body>
    </html> 

  2. #2
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,339

    Default Please assign ticket #

    Please assign ticket number for this bug... fingers crossed this is fixed in the 4.1 release

Posting Permissions

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