Results 1 to 2 of 2

Thread: [4.1.2] Unable to drag sprite after setViewBox

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2009

    Default [4.1.2] Unable to drag sprite after setViewBox

    Ext version tested:
    • Ext.4.1.2
    • Ext.4.1.3
    • Ext
    • Chrome 24.0.1312.52 m
    • Setting an Ext.draw.Sprite to draggable and adding it to to the surface allows you to drag the sprite around. However, after doing a surface.setViewBox to a smaller view, only the top left corner of the sprite is draggable.
    Steps to reproduce the problem:
    • Create a draw.Component.
    • Create a sprite and add it to the draw.Component.
    • Set the viewbox of the draw.Component's surface to a smaller view.
    The result that was expected:
    • A sprite that is draggable
    The result that occurs instead:
    • A sprite that is only draggable from the top left corner.
    Test Case:
    var drawComponent = Ext.create('Ext.draw.Component', {});
    Ext.create('Ext.Window', {
        width: 500,
        height: 200,
        layout: 'fit',
        items: [drawComponent]
    var circle = Ext.create( 'Ext.draw.Sprite', {
        type: 'rect',
        draggable: true,
        fill: '#79BB3F',
        x: 10,
        y: 10,
        width: 50,
        height: 25
    drawComponent.surface.add( circle );
    drawComponent.surface.setViewBox( 0, 0, 50, 50 );

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL


    Thanks for the report! I have opened a bug in our bug tracker.

Posting Permissions

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