Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10632 closed defect (fixed)

getBoundingBox() returns undefined on certain Polyline shapes

Reported by: liyang Owned by: Eugene Lazutkin
Priority: high Milestone: 1.4.1
Component: DojoX GFX Version: 1.4.0
Keywords: gfx polyline bbox Cc:
Blocked By: Blocking:

Description

If polyline shape is created from an array of numbers (instead of array of {x:number, y:number}), then its getBoundingBox() will return undefined values.

e.g. var p = surface.createPolyline([300,300,300,400,400,500]);

p.getBoundingBox(); returns bad result

See attached test case for more details.

A patch is also attached, affecting shape.js, vml.js, svg.js and silverlight.js

Attachments (2)

dojo.bbox-polyline.testcase.html (1.6 KB) - added by liyang 9 years ago.
dojo.bbox-polyline.patch (3.0 KB) - added by liyang 9 years ago.
patch

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by liyang

Changed 9 years ago by liyang

Attachment: dojo.bbox-polyline.patch added

patch

comment:1 Changed 9 years ago by Eugene Lazutkin

Milestone: tbd1.4.1

comment:2 Changed 9 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

(In [21168]) gfx: adding a polyline normalization to make sure that a bounding box is calculated properly, thx liyang!, !strict, fixes #10632.

comment:3 Changed 9 years ago by Eugene Lazutkin

(In [21195]) dojox.gfx: copying fixes to 1.4.x branch, !strict, refs #10345, refs #9815, refs #9858, refs #10353, refs #10632.

Note: See TracTickets for help on using tickets.