Results 1 to 5 of 5

Thread: IE9 not displaying sprites by default

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    1
    Vote Rating
    0
      0  

    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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Can I see your code?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    118
    Vote Rating
    0
      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
      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
      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)

Posting Permissions

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