I found that grouping in IE works not very well. I've got everything perfect in FireFox, but IE makes me nuts!
You can try it with http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/sketch/tests/te... and I hope you will understand which "efects" I mean. Just try to resize the shape 2 in IE (ie7 for instance) with the top-left corner to the north-west and you'll see the background image moving. Moreover, when performing massive random dragging (just start dragging shape by shape and try to do it as fast as you can) then you'll see moving/jumping of other shapes which should stay on their places.
I've also noticed that if you group shapes which have left/top less then zero, then the grouping causes odd behavior, really odd I can't even explain... all other grouped shapes jump from their places or change their sizes.
I understand that the sketch is not claimed as fully working app, but I've got exactly the same problem in my app. I submitted the ticket http://trac.dojotoolkit.org/ticket/6137, but I can't wait. I'm very close to very first beta and I need to fix it somehow very soon.
As far as I understand the problem somewhere in vml.js _overrideSize all shapes are resized to the surface dimentions (see below)
Does anybody know which way I must dig to solve it? Can anybody help? Thank you in advance.
....8<....
createObject: function(shapeType, rawShape) {
// summary: creates an instance of the passed shapeType class
// shapeType: Function: a class constructor to create an instance of
// rawShape: Object: properties to be passed in to the classes "setShape" method
// overrideSize: Boolean: set the size explicitly, if true
....8<....
switch(shapeType){
case dojox.gfx.Group:
case dojox.gfx.Line:
case dojox.gfx.Polyline:
case dojox.gfx.Text:
case dojox.gfx.Path:
case dojox.gfx.TextPath:
this._overrideSize(node);
....8<....
},
_overrideSize: function(node){
var p = this;
while(p && !(p instanceof dojox.gfx.Surface)){ p = p.parent; }
node.style.width = p.width;
node.style.height = p.height;
node.coordsize = p.width + " " + p.height;
}
....8<....

One thing I tried was to
One thing I tried was to make the background image it's own "group"; IE, something like this:
bgimg = surface.createGroup();
bgimg.createImage(...);
When I did this, the image itself stopped moving around for some reason.
I'm not sure if this will help your issue specifically, though.
There is a gfx demo called
There is a gfx demo called Circles (http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/gfx/demos/circl...), which allows to move circles with mouse in the "negative territory". Can you reproduce the effect you are writing about with this demo? If not, can you tell me what's meaningfully different between your program and Circles?
I did
Please take a look at http://trac.dojotoolkit.org/ticket/6137
There are 3 attachment:
http://trac.dojotoolkit.org/attachment/ticket/6137/test_group_bug.html
http://trac.dojotoolkit.org/attachment/ticket/6137/IE_result.jpg
http://trac.dojotoolkit.org/attachment/ticket/6137/FireFox_result.jpg
Circles demo works fine, but cause there in no groupings
I did
I need a tip or something... plz
I think I found it
Hello Anton,
I think I found the reason -dojox.sketch dynamically creates shapes on mouse-down/-move, i.e. the anchors and the visualization of the bounding box. Internet Explorer or the VML renderer has a problem with this as the background image of the sketch changes its position whenever shapes are created or changed via the setShape method. This is also the reason why this issue cannot be reproduced with GFX's circles demo - the shapes are only created at initialization but not on mouse-down/move. I've currently worked around the issue by reimplementing the dojox.sketch Anchor and creating anchor shapes at the initialization of an Annotation only - when enabling or disabling anchors these are only shown or hidden by setting their stroke and fill attributes. With the bounding box it didn't seem possible that easy so I've deactivated the bounding box visualization in our annotations.
Just try and deactivate the Anchor shape creation and the Annotation's bounding box visualization code in dojx.sketch and the effect you've described is gone. I think you could also give eugene a reproducible test case based on the circles demo if you add something like the Anchors feature in there.
Best regards
Andreas
Hi Andreas, In terms of my
Hi Andreas,
In terms of my application I have figures. A figure is a group of shapes. Let's consider a line as an example.
Line is a group which has a path shape and 2 circles (anchors). The path is a line with an arrow on its end.
If you drag an anchor, then the figure should be updated. If you drag the line, then the group should be moved.
I create a figure once and then just change it with setShape, setTransform methods.
So if I create 2 lines and then:
If I drag an anchor of line 1, then I see jumping of line 2. It jumps up and then goes back - really odd.
If I drag line 1 out of the left top corner, then line 2 moves in the opposite direction.
I noticed the same behavior in your sketch, beside one thing. It is the background moving instead of shape moving, but I dont think it makes difference. Just try to move any shape out of the top left corner.
So what can I do to fix it?
Well, in that case I don't
Well, in that case I don't know if the cause of the symptoms (background image moving in dojox.sketch and other shapes moving in your application) is really the same. The only thing I know is that I can get rid of the somewhat annoying background-image-moving issue in IE by implementing the dojox.sketch anchors in another way and deactivating its bounding box visualization.
Please note that I'm not part of the Dojo foundation and I didn't create dojox.sketch. I'm just using dojox.sketch for development, probably just like you.
To Tom: gfx and sketch are still great! :)
You know...
...a good portion of these issues (a *real* good portion) is just the half-hearted implementation that is what we know as VML. We're doing our best, and we'll be doing some things in the near future to try to get around them (i.e. get around VML altogether) but I don't know that this will help.
Yes, I ran across some similar issues with sketch, and yes, sticking a background image in a group helped a bit, but the issue is still there. A good portion of the problem is that VML tries a little too hard to integrate with HTML--and it doesn't help that MS seems to have abandoned it altogether for Silverlight.
(Not that I entirely blame them; that problem is akin to the idea of rewriting the IE engine to be W3C based in a backwards-compatible manner.)
You can try to limit your updating by using setTimeout as opposed to trying to get Trident to react for every mouse move; that might help though it may also make your drag seems a bit jumpy.
We *are* working on some ideas, because we are just as frustrated as you are about it.