Blox equivalent of ZoomToFit

I am trying to port some code from VCL Diagram Editor and while I may have overlooked something obvious, I seem unable to find a match for TatDiagram.ZoomToFit.

Can some one either help me find the Blox equivalent if it is there and I simply failed to see it, or help me with implementing a 'best match' of what TatDiagram.ZoomToFit does?

Thank you!

ZoomToFit is a diagram editor specific function, there is currently no editor available in TMS FNC Blox. We'll investigate what is possible in TMS FNC Blox.

Nevertheless, a Blox diagram is loaded and rendered within the confines of a TTMSFNCBloxControl, and if I knew the extent of the loaded diagram vs. the control, I could manually call Zoom with a a suitable argument. Clearly I wish to get a means to achieve this by code, as per the end result Diagram Studio method ZoomToFit.

I hope you can conjure up something!


As said: "We'll investigate what is possible"

Sorry, may I just clarify a point?

When you say:

I'm not sure I fully grasp what you mean :thinking:

The method is part of TatDiagram (in atDiagram.pas) not a part of TDiagramEditor (DiagramEditor.pas).

I'm not sure if I misunderstand, but it looks like you suggest the issue is the method residing in TDiagramEditor. Apologies for my lack of understanding - just trying to ensure I stay on the right page.

The VCL version has an editor, and editor specific functionality that has been taken out of FNC, because of cross platform requirements. Also the whole core has been rewritten so I’m sure that there is a workaround, but it needs some further investigation.

We have added a ZoomMoveToFit, equivalent of that in atDiagram.pas, next version of TMS FNC Blox will have this included.

Marvelous news, thanks Pieter, much appreciated

Do we know the release schedule for the next version?

Mid next week

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.