Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2011
    Location
    St. Louis
    Posts
    206
    Vote Rating
    8
    jimmylu98 will become famous soon enough

      0  

    Default Unanswered: draw image tag: displaed image is cutoff

    Unanswered: draw image tag: displaed image is cutoff


    Try to display image using touch chart/draw, but the displayed image is cut off. See attached picture and codes to reproduce the problem:
    Touch draw: Image is cut off. add scale could show the whole image, but with incorrect size.
    PHP Code:
    Ext.setup({
        
    icon'icon.png',
        
    glossOnIconfalse,
        
    tabletStartupScreen'tablet_startup.png',
        
    phoneStartupScreen'phone_startup.png',
        
    onReady: function() {
        var 
    drawComponent = new Ext.draw.Component({
                
    viewBoxtrue,
            
    width400,
            
    height300,
                
    items: [{
                
    xtype'sprite',
                       
    type'image',
                
    src'"/CroixDeFer.JPG"',
                    
    x0,
                    
    y0,
                
    width400,
                
    height300,
    /*
                  scale: {
       cx: 0,
       cy: 0,
       x: .5,
       y: .5

                  }
    */
               
    }]
        });
        var 
    = new Ext.Panel({
                
    fullscreentrue,
            
    width400,
            
    height300,
                
    layout: {
                    
    type'fit',
                    
    align'stretch'
               
    },
            
    items: [drawComponent],
              });
        }
    }); 
    Ext4: draw image is correct:
    PHP Code:

    Ext
    .onReady(function () {
        var 
    drawComponent = new Ext.draw.Component({
                
    viewBoxtrue,
            
    width400,
            
    height300,
                
    items: [{
                
    xtype'sprite',
                       
    type'image',
                
    src'/CroixDeFer.JPG',
                    
    x0,
                    
    y0,
                
    width400,
                
    height300
               
    }]
        });
        
    Ext.create('Ext.Window', {
                
    width400,
                
    height300,
                
    layout: {
                    
    type'fit',
                    
    align'stretch'
               
    },
                
    items: [drawComponent]
        }).
    show(); 
    }) 
    This problem happens on Chrome and Android phone. It may be a bug.

    Thank you for the support.
    Jimmy
    Attached Images

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    168
    Vote Rating
    0
    philogb is on a distinguished road

      0  

    Default


    Hi - I think that there's a different convention for touch charts, the x, y position will be where the center of the image is. We found out that this was a better approach for images used as markers for scatter, or line charts for example, since we want the image to be centered around a given point. In your case setting x, y might work for you


    xtype: 'sprite',
    type: 'image',
    src: '"/CroixDeFer.JPG"',
    x: -200,
    y: -150,
    width: 400,
    height: 300,



  3. #3
    Ext JS Premium Member
    Join Date
    Jun 2011
    Location
    St. Louis
    Posts
    206
    Vote Rating
    8
    jimmylu98 will become famous soon enough

      0  

    Default


    Thank you.

    x and y should be:

    x: 200, or w/2
    y: 150, or h/2

    Jimmy

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar