Rectangle shifts position on resize
If I create a rectangle (components->workflow->workflow documentation) and resize it, the entire rectangle shifts slightly up and left.
#1 Updated by Christopher Brooks almost 11 years ago
This bug: "create a rectangle (components->workflow->workflow documentation) and
resize it," is also present in Ptolemy, but is not present in the Diva
tutorial in ptII/diva/canvas/tutorial.
I suspect that the problem is the snap to grid, but I did not stumble across
a way to disable snap to grid and change the behavior of this bug.
#2 Updated by Christopher Brooks almost 11 years ago
I might have this one fixed, Edward may have some comments.
It turns out that RectangleAttribute and ResizablePolygonAttribute had
the same bug: creating one of them and then resizing would cause the figure
to jump up and to the left. With ResizablePolygonAttribute, this was
especially obvious. However, EllipseAttribute did not have the problem.
EllipseAttribute was setting the centered Parameter to true. When I
made this change to RectangleAttribute and ResizablePolygonAttribute, the
problem went away.
I looked at a few demos and icons, and this change did not appear to cause
problems. I'm not sure why.
I'm leaving this open pending review to see if the change causes problems.
#3 Updated by Christopher Brooks almost 11 years ago
I'm closing this, my solution was to modify the configuration
so that new RectangleAttributes are created with centered set
to true, which means that new RectangleAttributes will not have
this bug, but old ones will jump around slightly. The alternative
would be to change the ctor to set centered to always be true,
which breaks existing models. A complete fix would be to fix
the old models as well, but I believe this to be very difficult
and not worth the engineering time. It is somewhat questionable
as to whether this bug should be closed, but my fix solves the
test case :-^. A new bug could be opened to fix the jump in
existing RectangleAttributes . . .