I'm trying to create a tool that draws a custom-shaped Rubber Bound box on top of an image (in this case, a map projection). The functions that allow the calculations work, and I'm able to create the PolyLine just fine. However, in Internet Explorer, it behaves incorrectly: If there are any "negative" points, they seem to be shoved so that the drawing is flush with the left and/or top edges of the canvas; in other words, drawing off of the left and/or top edges of the canvas seem to not work, although drawing off the right and top edges works fine. I want the lines, etc, to simply clip at the edges. It also shoves the image to match, like the canvas is being shifted.
In playing around with the "Create DojoX GFX JSON" example, though, I was able to make it so that such drawings ARE clipped, but I can't really see what I'm doing differently there.
I'll try to get some code up somewhere, but in the meantime, is there something "simple" that is a general gotcha for this type of thing?

same problem
I've got exactly the same problem
take a look at http://dojotoolkit.org/forum/dojox-dojox/dojox-support/gfx-group-ie-work...
I haven't found a way to solve it yet
I think I discovered the
I think I discovered the problem. In IE, if there is a DOCTYPE tag at the top, it causes this behavior. If the DOCTYPE tag is removed, it seems to work like it's supposed to.
However, it looks like this SHOULDN'T be the case. According to this thread (http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-support/dijit-vertica...), at one point if you used GFX you couldn't used DOCTYPE. A follow-up comment, however, says this has been fixed, though for me it seems like this is still the cause (removing the DOCTYPE causes it to work, adding it causes it to fail). However, perhaps it's specific DOCTYPEs that cause the failure, I'll play around with it.
But you might try removing the DOCTYPE tag temporarily and see if that helps it work like it should.
(I have noticed, though, that the VML in IE seems to run MUCH slower than whatever runs on FireFox).
You should realize that VML
You should realize that VML predates doctype. It is not possible to make it play nice with doctype without MS' help. While we tried to do some fixes and made it work in some cases, there are always some cases, which will be broken.
Unfortunately, it is not the
Unfortunately, it is not the case. Ive no any doctype tag.
and yes it very slow in IE :(( but pure vml (without dojo) works pretty nice
Can you produce a simple
Can you produce a simple program that shows the significant difference in speed between the dojox.gfx and pure vml? Or two similar programs that show the difference. It would help us to improve the performance.
I did
I created 2 samples for you. Please take a look at http://trac.dojotoolkit.org/ticket/6363. There are 2 attachments.
Just open them and you will get a pop-up with a number in ms
I tested on my quad core 2.4 and I got:
performance_dojo.html gives FF ~0.3 sec, IE7 ~ 1.2 sec
performance_purevml.html gives IE7 ~ 0.5 sec
Another thing I'd like to note is the difference in the result for the performance_dojo.html.
For FF it displays 2 circles and a line, for IE it displays nothing
or look here
http://nachtergaele.homeip.net/sandbox/dojotest/
Stefaan,
design-visit.com