#14100 closed defect (fixed)
[regression][patch][cla] dojox.gfx.svg.Rect setShape no longer checks if this.shape.r has a valid value
Reported by: | ben hockey | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | DojoX GFX | Version: | 1.7.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
previously in dojox.gfx.svg.Rect, setShape
had some code like this:
if (this.shape.r) { this.rawNode.setAttribute("ry", this.shape.r); this.rawNode.setAttribute("rx", this.shape.r); }
now it is:
if ("r" in this.shape) { this.rawNode.setAttribute("ry", this.shape.r); this.rawNode.setAttribute("rx", this.shape.r); }
this causes an error if this.shape.r
is undefined
.
Error: Invalid value for <rect> attribute ry="undefined" Error: Invalid value for <rect> attribute rx="undefined"
probably a better option would be:
if (this.shape.r != null) { this.rawNode.setAttribute("ry", this.shape.r); this.rawNode.setAttribute("rx", this.shape.r); }
NOTE: intentionally using !=
instead of !==
so that null
and undefined
or rejected but 0
is accepted.
Change History (3)
comment:1 Changed 9 years ago by
Summary: | [regression] dojox.gfx.svg.Rect setShape no longer checks if this.shape.r has a valid value → [regression][patch][cla] dojox.gfx.svg.Rect setShape no longer checks if this.shape.r has a valid value |
---|
comment:2 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 9 years ago by
Milestone: | tbd → 1.7 |
---|
Note: See
TracTickets for help on using
tickets.
In [26881]: