Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#9624 closed defect (fixed)

[patch][ccla]Adding shapes to surface groups in IE7 changes shape positions

Reported by: hrutter Owned by: Eugene Lazutkin
Priority: high Milestone: 1.6
Component: DojoX GFX Version: 1.3.2
Keywords: gfx, IE7, surface, group, shape Cc:
Blocked By: Blocking:

Description

This is a bug that shows up under IE7. Under FFox everything works fine.

Attached are 2 testfiles that create 4 shapes on a surface and then add them to a group.

Adding them to the group actually changes their position, moving them around, or out of the visible area of the surface.

Looks also like there is a problem when a shape has a negative value for x or y on the position.

I have confirmed this behavior for shapes of type rectangle and image.

I am suspecting a VML problem.

This is a showstopper for me, I need image shapes that are partly positioned outside of the surface.

This used to work in prior dojo versions (eg 1.1)

Attachments (5)

tests.zip (1.6 KB) - added by hrutter 10 years ago.
zip containing 2 html files
IE_group_fail_example.html (2.1 KB) - added by Fredrik 10 years ago.
test case (was initially posted in the forum)
vml.patch (897 bytes) - added by Adam Peller 9 years ago.
patch from Li Yang (IBM, CCLA)
vml.2.patch (1.2 KB) - added by Fredrik 9 years ago.
variant of Li Yiang's patch with improved fill & stroke preservation
vml.3.patch (1.3 KB) - added by Fredrik 9 years ago.
now also handles text shapes

Download all attachments as: .zip

Change History (20)

Changed 10 years ago by hrutter

Attachment: tests.zip added

zip containing 2 html files

comment:1 Changed 10 years ago by hrutter

I found a workaround:

If shapes are created via

group.createImage(..)

instead of

surface.createImage(..)

everythings fine.

comment:2 Changed 10 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

comment:3 Changed 10 years ago by Eugene Lazutkin

Priority: highesthigh
severity: blockermajor

comment:4 Changed 10 years ago by Fredrik

Hi, This seems like the same bug I reported about here a while ago: http://dojotoolkit.org/forum/dojox-dojox/dojox-development-discussion/gfx-ie-vml-group-problem

Close to a showstopper, would love to see a fix for this! (Didn't know it worked in earlier versions(?), will do some diffs.)

Fredrik

comment:5 Changed 10 years ago by Fredrik

Any news here? For reference: I've tested my example case (above) using several earlier releases of Dojo (1.0->1.4) and unfortunately I can't find a version that indicates this has ever worked. (I also took the liberty to reopen http://bugs.dojotoolkit.org/ticket/6137, close to a duplicate of this ticket I'd say).

Fredrik

Changed 10 years ago by Fredrik

Attachment: IE_group_fail_example.html added

test case (was initially posted in the forum)

comment:6 Changed 9 years ago by liyang

I made a patch for this, shall upload here soon after gone through IBM internal process.

comment:7 in reply to:  6 Changed 9 years ago by Fredrik

Replying to liyang:

I made a patch for this, shall upload here soon after gone through IBM internal process.

That sounds like Great news indeed! How's the process proceeding? Do you have an estimate?

Fredrik

Changed 9 years ago by Adam Peller

Attachment: vml.patch added

patch from Li Yang (IBM, CCLA)

comment:8 Changed 9 years ago by Adam Peller

Milestone: futuretbd
Summary: Adding shapes to surface groups in IE7 changes shape positions[patch][ccla]Adding shapes to surface groups in IE7 changes shape positions

comment:9 Changed 9 years ago by Fredrik

I've now tested Li Yiang's patch. The position problem is fixed but fill and stroke opacity isn't preserved in all cases. Seems like you need to re-apply fill/stroke hierarchically for the entire group, not just the currently added shape.

Effects can be demonstrated by modifying my "IE_group_fail_example.html" example above by setting a fill alpha and/or uncommenting the last few rows that moves shapes into another group level.

See attached patch (currently adds a dependency on dojox.gfx.utils.forEach for traversal). Tested in IE8 with/without compatibility mode.

Second, and hopefully last, major problem I can identify is that text doesn't work (not visible at all). Seems like text shapes get incorrect width/height (1x1) but also some other problem I've yet to figure out. Any help appreciated.

Thanks to Li Yang for getting this issue rolling again! / Fredrik

Changed 9 years ago by Fredrik

Attachment: vml.2.patch added

variant of Li Yiang's patch with improved fill & stroke preservation

comment:10 in reply to:  9 Changed 9 years ago by Fredrik

Replying to Fredrik: -> ... disregard the "text 1x1 dimension" stuff. Was due to my setup, should not be related to the text rendering problem.

comment:11 Changed 9 years ago by Fredrik

Found time to do some more tests and seemed like text shapes just needed a complete refresh. See attached patch. (the dependency on dojox.gfx.utils (forEach) can be removed if necessary).

Haven't systematically tested all types of shapes, so there might be some case left. The fix pattern should most likely be similar though.

Fredrik Blomqvist

Changed 9 years ago by Fredrik

Attachment: vml.3.patch added

now also handles text shapes

comment:12 Changed 9 years ago by Eugene Lazutkin

Milestone: tbd1.6
Priority: highnormal
severity: majornormal

Need careful review.

comment:13 Changed 9 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [23693]) gfx: better handling moved shapes in VML, thx Li Yang (IBM, CCLA) and Fredrik!, !strict, fixes #9624.

comment:14 Changed 8 years ago by yehuda

Looks like the fix caused a new issue in version 1.6 . This issues causes dramatic performance degradation in IE7 and 8 if 100 or more shapes are displayed on the same surface. I opened a new ticket for that (#12456)

comment:15 Changed 8 years ago by Patrick Ruzand

In [26722]:

fix performance regression. #9624 patch should now be explicitly enabled via a djConfig flag (fixVmlAdd:true), disabled by default., fixes #12456, refs #9624

Note: See TracTickets for help on using tickets.