items with negative x,y


I noticed that you could say 'outofbounds' to true. This enables the blocks to go to the right and bottom outside of the visible viewport. However, when I want to move a diagram to the left and top it will always halt. Seems that the block can not have a negative x,y coordinate.
Is it possible to tell me if this is deliberate or is there as well some function to enable this? If not, can this be changed easily in the source code and where?
Thank you


Thlnk I found it. In the panelresize, there is a recalculation of the x,y coordinates in case of negative
I disabled these lines
//    if (MinLeft < 0) or (MinTop < 0) then
//    begin
//      BeginInternalUpdate;
//      BeginUpdatePos;
//      try
//        for c:= 0 to DControlCount - 1 do
//          if not DControls[c].IsMember then
//            DControls[c].MovePosition(-MinLeft, -MinTop);
//      finally
//        EndUpdatePos;
//        EndInternalUpdate;
//        for c := 0 to DControlCount - 1 do
//          DControls[c].NotifyAnchoreds(acPosition);
//      end;
//    end;
Seems its working after that.
Any hidden problems I could enconter by doing this?

This is by design indeed, to be honest I can't tell right now what are consequences of allowing this. I appreciate if you could give us some feedback!

Working perfectly!
No problems encountered. However, stumbled accross another one. (as you can see, I'm using it heavily for the moment).
I got some x,y coordinates that I saved in a db and now I want to get it showing on screen.
I'm using a polygon block (think its called tdiagrampolyblock?)
Anyway, I can't use the handles.orpoint there but I need to use polygon.add...
So far so good. The only problem is that I seem to need to define a width and a height. Also my polygon is drawn at top, left 0,0
I created the polygon with the startinsertingcontrol and I looped through the polygon points and saved them.
Would it be possible to tell me how I can automatically restore the polygon on the diagram where I drew it?

For now its drawing very small and in 0,0.

Can you please post the code you are using to build the polygon block for a better understanding?

curDataBlock := TPolygonBlock.Create(nil);
with curDataBlock do
for f := 0 to high(numpoints) do
pts := numpoints;
Polygon.Add(pts.X ,pts.Y);
Diagram := DrawLayer;
LayerName :='test';

Found it...

This is what i needed to do:
Added line after polygon.add
This indeed gave me the points to be corrected. However, surrounding box however stayed at 0,0
What I noticed was that, when moving the points, the box surrounded correctly my points. Some investigation
revealed that internally, there is a procedure to change the original rect.
So I added in the changepolygon procedure the following:
BoundsRect := Drawer.OriginalRect;
Tadaaaa, it works.
Where do I need to be to get a discount to other components lol
Anyway, great comp Wagner. Any idea if this comp can be added to the web comps?

Hi Geert,

great to hear you sorted it out. You mean a Diagram Studio version for intraweb? Currently there is no plan for such product, sorry.

That's really a pitty. I want to use it as well for some intraweb projects...