Opened 12 years ago

Closed 12 years ago

#5237 closed defect (wontfix)

GFX drawing appears on FF but not on IE

Reported by: guest Owned by: Eugene Lazutkin
Priority: blocker Milestone: 1.0.2
Component: DojoX GFX Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

The attached code draws on FF2 but not on IE. In fact, it seems to draw but it does not appear on IE...

<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN" "http://www.w3.org/TR/html4/strict.dtd" <html> <head>

<!-- config for Dojo location --> <script type="text/javascript"

src="dojo.x/dojo/dojo.js" djConfig="parseOnLoad: true">

</script> <!-- end dojo config -->

<!-- dojo stuff --> <script type="text/javascript">

dojo.require("dojo.parser"); dojo.require("dojox.gfx");

</script>

<script type="text/javascript">

------------------------------ Drawing function _drawSetup() {

var _drawContainer = dojo.byId('drawArea'); var _drawSurface = dojox.gfx.createSurface( _drawContainer, "100%", "100%" ); var _drawCurLine = _drawSurface.createLine(

{x1: 0, y1: 0, x2:500, y2:500} ) .setStroke( {color:[0,0,0,1], width:1} );

}

dojo.addOnLoad( _drawSetup );

</script>

</head> <body>

<div id=drawArea></div>

</body> </html>

Change History (3)

comment:1 in reply to:  description Changed 12 years ago by guest

Replying to guest:

if I get rid of the <DOCTYPE>, then on IE a line appears but the angle or coordinates are wrong. What is the correct <doctype>?

jeffg@…

comment:2 Changed 12 years ago by Eugene Lazutkin

Status: newassigned

Please never post code inline, always attach it to the ticket. An inlined code tends to be mangled --- see above for yourself.

Don't use doctype with VML --- it was designed and implemented by MS before doctype.

comment:3 Changed 12 years ago by Eugene Lazutkin

Resolution: wontfix
Status: assignedclosed

Yep, VML tends to have wrong ideas about "how much pixels in 100%". Please use pixels and if you want to resize the surface automatically do it with surface.setDimensions() method.

I tried to support "100%" for VML but it turned out way overcomplicated. External code with setDimensions() tends to be smaller and simpler.

Note: See TracTickets for help on using tickets.