Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#5223 closed defect (wontfix)

IE size problems.

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 1.1
Component: DojoX GFX Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

Just tried dojo 1.0.1, it has fixed the below issue http://trac.dojotoolkit.org/ticket/5035

but now there is a problem where dojo changes the div size but should change the canavas size only. This problem occus in IE.

  1. Div has a width of 100% so it can expand
  2. createSurface(container, 100, 100)
  3. div width changes to 100 and will remain 100 overriding my 100%.

i think the same problem occurs for height, please check the file attached in dojo 0.9 and 1.0.1 to see the difference.

Attachments (1)

test.htm (767 bytes) - added by guest 12 years ago.
test file

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by guest

Attachment: test.htm added

test file

comment:1 Changed 12 years ago by Eugene Lazutkin

Milestone: 1.1
Status: newassigned

comment:2 Changed 11 years ago by Eugene Lazutkin

Resolution: invalid
Status: assignedclosed

It is an "invalid":

  1. We don't officially support specifying dimensions in percents precisely because VML cannot deal with them.
  2. createSurface() overrides dimensions and this is the correct behavior.

comment:3 Changed 11 years ago by guest

Resolution: invalid
Status: closedreopened

Sorry to reopen this, I think you misunderstood the idea of where i'm setting the percents (point 1). The 100% is set in the htmlcss not in setDimentionVML.

Anyway, I've taken a look at the source and found where the problem lies.

In "vml.js" method "dojox.gfx.createSurface"

These two lines cause the problem. p.style.width = width; p.style.height = height;

they set the div size with a static size and therefore loose it's dynamic 100% which is set in the css. Thus when you resize your window the div adjusts accordingly.

by removing the above 2 lines I get the correct behavior.

comment:4 Changed 11 years ago by Eugene Lazutkin

Resolution: wontfix
Status: reopenedclosed

Size of the surface should be specified in pixels, and cannot be dynamic. If you want to change it dynamically --- there is a method dojox.gfx.Surface.setDimensions(width, height) to do so.

Note: See TracTickets for help on using tickets.