[CLOSED] Draggable Sprite

  1. #1

    [CLOSED] Draggable Sprite

    Hi, I'm trying to make a sprite draggable just by setting draggable = 'true', however I get an error:

    Uncaught TypeError: Cannot read property 'dom' of undefined

    Exception is in this code:
        applyZIndex: function(sprite) {
            var me = this,
                items = me.items,
                idx = items.indexOf(sprite),
                el = sprite.el,
                prevEl;
            if (me.el.dom.childNodes[idx + 2] !== el.dom) { Uncaught TypeError: Cannot read property 'dom' of undefined
    
    
    
                if (idx > 0) {
                    
                    do {
                        prevEl = items.getAt(--idx).el;
                    } while (!prevEl && idx > 0);
                }
                el.insertAfter(prevEl || me.bgRect);
            }
            sprite.zIndexDirty = false;
        },

    My code:

             <ext:DrawComponent ID="DrawComponent2" runat="server" ViewBox="True">
                    <Items>
                        <ext:Sprite SpriteID="spriteBubble" Type="Path" Path="m16.70551,10.67212c-4.26343,0 -7.69574,3.16641 -7.69574,7.09454l0,64.69247c0,3.9281 3.43231,7.09454 7.69574,7.09454l4.56934,0c-1.69879,7.48761 -5.36029,14.7037 -8.89819,21.8848c9.09833,-6.26215 15.96082,-13.08273 21.88483,-21.8848l0.36053,0l89.82397,0c4.26343,0 7.69574,-3.16644 7.69574,-7.09454l0,-64.69247c0,-3.92813 -3.43231,-7.09454 -7.69574,-7.09454l-107.74066,0l0.00018,0z"
                            StrokeWidth="1" Stroke="#3a3801" Fill="#fffdc6" Group="sprite1">
                            <Translate X="100" Y="10">
                            </Translate>
                            <Listeners>
                                <Click Handler="alert('text')">
                                </Click>
                            </Listeners>
                        </ext:Sprite>
                        <ext:Sprite Type="Text" Text="Hello" Group="sprite1" Draggable="True">
                            <Translate X="120" Y="35" />
                            <Listeners>
                                <Click Handler="alert('text')">
                                </Click>
                            </Listeners>
                        </ext:Sprite>
                    </Items>
                </ext:DrawComponent>
    Last edited by Daniil; May 14, 2012 at 8:35 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Thanks for the report. Fixed in SVN. Please update and retest
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Draggable & Resizable items in Beta 2
    By Dominik in forum 2.x Help
    Replies: 1
    Last Post: Jun 05, 2012, 7:59 AM
  2. Resizable & Draggable items
    By Dominik in forum 2.x Help
    Replies: 6
    Last Post: May 29, 2012, 9:39 AM
  3. GMap Marker Draggable
    By bg101 in forum 1.x Help
    Replies: 5
    Last Post: Apr 09, 2012, 9:51 AM
  4. Draggable Accordion Panels Easy?
    By cgountanis in forum 1.x Help
    Replies: 2
    Last Post: Dec 16, 2009, 11:48 AM
  5. Draggable Fieldsets?
    By jlertle in forum 1.x Help
    Replies: 0
    Last Post: Jul 02, 2008, 11:18 PM

Posting Permissions