Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic error when posting back after using zoomToFit (Read 2056 times)
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
error when posting back after using zoomToFit
Jan 16th, 2013 at 12:19pm
Print Post  
I have a canvas diagram on an asp.net-page
I can save and load it in code.
But when use diagram.zoomToFit() once in script,  there after postback always failes, with the error below.
(the Page_Load doesn't get executed)

any idea what is wrong?


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +10689507
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +145
   System.Int32.Parse(String s) +23
   A.c11941951d1a217fe413d2aa0601bfabd.cbbf592332de50228c4bd5b75abaea207(DiagramVie
w c5c59c6a4a2a6c4948790bb75e068d36f, String cbb2cc7e35972c9b4f274ffacff72079c) +2124
   A.c11941951d1a217fe413d2aa0601bfabd.c6aa5f7fdc2e26faac71768535b65443e(DiagramVie
w c3d2ea328bcae2cddab9c206fcedee40b, String c9ec0dbdde9b6a1a1d537757377d801dc, NameValueCollection c5c11b67bc18f800a1449180ab80777f2) +96
   MindFusion.Diagramming.WebForms.DiagramView.LoadPostData(String postDataKey, NameValueCollection postCollection) +144
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +734
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1960
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: error when posting back after using zoomToFit
Reply #1 - Jan 16th, 2013 at 1:13pm
Print Post  
It's a bug in the server code expecting ZoomFactor to be integer. For the time being you could round it after calling zoomToFit:

diagram.zoomToFit();
diagram.setZoomFactor(Math.round(diagram.getZoomFactor()));

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint