Opened 13 years ago

Closed 13 years ago

#9755 closed defect (fixed)

dojox.gfx.vml sizing issue

Reported by: liucougar Owned by: Eugene Lazutkin
Priority: high Milestone: 1.4
Component: DojoX GFX Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


While trying to fix a bug in dojox.sketch, I noticed a problem in dojox.gfx.vml:

if you load dojox/sketch/tests/test_full.html in IE7, move the slider to right end (zoom in), the canvas now gets bigger. (while in FF, scrollbar appears in the canvas, and canvas is not enlarged.)

I tracked down the cause for the vml issue: in vml.js, the width/height are explicitly set for the parentNode of the surface, because if no size is explicitly set, IE consider a VML node has 0 height (among other things, this fixes dojox/gfx/tests/test_image3.html).

However, for the dojox.sketch test case, the size for the canvas is already specified (in css), so there is no need to set them in vml.js. The intention for the dojox.sketch test case is that, the canvas is always the size no matter in what zoom ratio. If the image is too big, just show scrollbars. (this is similar to the case when sketch is placed inside a layout widget).

SVG does not suffer from this issue, because the size of the svg element is properly calculated in all cases.

Attachments (1)

9755.patch (845 bytes) - added by liucougar 13 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

(In [19943]) Clean up of renderers, implementing indirect surface size specification using dojo.position(), !strict, fixes #9755.

comment:2 Changed 13 years ago by liucougar

Resolution: fixed
Status: closedreopened

this is not actually being fixed by [19943], I forgot to revert my local changes before I verified this bug. After reverting my local changes, this bug still happens

comment:3 Changed 13 years ago by liucougar

(In [19957]) refs #9755: added a test case for this bug

Changed 13 years ago by liucougar

Attachment: 9755.patch added

comment:4 Changed 13 years ago by liucougar

attached a patch: check whether the parent node has overflow=auto set, if so, don't try to set its dimension when createSurface/setDimension

comment:5 Changed 13 years ago by liucougar

Resolution: fixed
Status: reopenedclosed

(In [19960]) fixes #9755: the bug is not actually a bug, the test case is wrong, this commit fixes the test case

Note: See TracTickets for help on using tickets.