Opened 12 years ago

Closed 12 years ago

#3859 closed defect (fixed)

IE loses stroke & fill styles on shape.setShape

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 0.9
Component: DojoX GFX Version: 0.9
Keywords: Cc: jayant.b.sai@…
Blocked By: Blocking:

Description

So I have a simple rect. When I add it, I set it's stroke & fill. Then for every time the rect changes, I just use shape.setShape() and change it. In FF, the original stroke & fill are respected, but in IE, the call to setShape loses the original stroke & fill.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>

<head>

<title>dojox.gfx.shape.setShape</title>
<script type="text/javascript" src="../../../js/dojo-0.9.0beta/dojo/dojo.js.uncompressed.js"></script>
<script type="text/javascript">

dojo.require("dojox.gfx");

var shape;
var rect = { x:100, y:100, width:100, height:100 };
var stroke = { color:[255, 0, 0], width:2 };
var fill = [0, 255, 0];

function test() {

var surface = dojox.gfx.createSurface(dojo.byId("gfxDiv"), 300, 300);
shape = surface.createRect(rect);
shape.setFill(fill);
shape.setStroke(stroke);

}

function reshape() {

rect.x -= 10;
rect.y -= 10;
shape.setShape(rect);

}

dojo.addOnLoad(test);

</script>

</head>
<body>

<div id="gfxDiv" style="width:300px; height:300px; border:1px solid #000; overflow:hidden;"></div>
<input type="button" value="reshape" onclick="reshape()" />

</body>

</html>

Attachments (1)

dojox_gfx_ie_setShape_loses_style.html (1.1 KB) - added by guest 12 years ago.
Code sample

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by Eugene Lazutkin

Status: newassigned

comment:2 Changed 12 years ago by Eugene Lazutkin

Milestone: 0.9

Changed 12 years ago by guest

Code sample

comment:3 Changed 12 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

Fixed in [9843].

Note: See TracTickets for help on using tickets.