1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    1
    Vote Rating
    0
    bhawesh is on a distinguished road

      0  

    Default IE9 not displaying sprites by default

    IE9 not displaying sprites by default


    Hi,

    I've been trying to draw a sprite using surface. It is comming fine in case of firefox and chrome but not in the case of IE9. In the case of IE9 every time i open the browser i have to go to dev tools (F12) and set the document mode to IE9 standards , otherwise it'll be in Quirks mode by default.
    Is there any way i can set the document mode as IE9 by default or i can invoke IE9 standard document mode from the code.

    Thanks
    Bhawesh

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Can I see your code?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    118
    Vote Rating
    0
    da_b0uncer is an unknown quantity at this point

      0  

    Default


    Got the same problem.

    I have an app, which get's used stand-alone and inside another web-app.

    When running the code stand-alone, IE9 is in "Standard IE9" mode.
    When running the code inside the other app, IE9 is in "Quirks" mode.

    Code:
    var oResult = Ext.create( 'Ext.draw.Component', {
       viewBox: false,
       items  : [
          {
             type  : 'rect',
             width : nBarWidth,
             height: nColumnHeight,
             fill  : 'LightGreen'
          }
       ]
    } );
    
    oResult.on( 'render', function() {
       Ext.create( 'Ext.tip.ToolTip', {
          target: oResult.id,
          html  : Ext.util.Format.number( nValue, '0,000' )
       } );
    } );
    The component gets created in quirks-mode and the tooltip is displayed, but the rectangle isn't rendered.

  4. #4
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    118
    Vote Rating
    0
    da_b0uncer is an unknown quantity at this point

      0  

    Default


    Found some informations:

    http://stackoverflow.com/questions/3885381/how-do-i-get-vml-working-in-standards-mode

    S
    eems like the charts are made with paths, which work.
    Also some path sprites I drew for testing worked.

    But the rect needs to change its style to position: absolute;

    I tried to create a rect-sprite setting this style and adding this to the items of the draw component. But I'm getting the error:

    Uncaught TypeError: Cannot read property 'setStyle' of undefined

    Also the adding in the "render" event of the draw component doesn't throw this error, but it the rects still won't get rendered.

    -- edit --

    In "Standard IE9" mode, ExtJS renders SVG
    In "Quirks" mode, ExtJS renders VML.

    With setAttribute({ style: { position: 'absolute' } } ) I got the style set, but this didn't help.

  5. #5
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    118
    Vote Rating
    0
    da_b0uncer is an unknown quantity at this point

      0  

    Default


    Searched a few hours and tried everything I found. Nothing worked.

    Now switched to using paths only. Maybe I will write my own sprite subclass, which uses paths for all kind of shapes. Seems like Sencha already does this with the charting (probably they knew about this problem, when making the charts)

Thread Participants: 2