Opened 14 years ago
Closed 14 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: | [email protected]… | |
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)
Change History (4)
comment:1 Changed 14 years ago by
Status: | new → assigned |
---|
comment:2 Changed 14 years ago by
Milestone: | → 0.9 |
---|
Changed 14 years ago by
Attachment: | dojox_gfx_ie_setShape_loses_style.html added |
---|
Code sample