Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic insufficient storage room to complete this command (Read 3113 times)
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
insufficient storage room to complete this command
Mar 15th, 2013 at 5:20pm
Print Post  
I'm using MindFusion.Diagramming.js from the latest Diagramming for ASP.NET, V5.0.
When I use setZoomFactorPivot and zoom in a lot, sometimes the diagram only renders half (as if the canvas isn't large enough.
When I zoom in even more I get a jscript runtime error (in Dutch which translates to:) Jscript runtime-error: insufficient storage room available to complete this command/process.

Is there a limit to the zooming factor ?
Is there a way to prevent this error ?
  

error_001.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: insufficient storage room to complete this command
Reply #1 - Mar 16th, 2013 at 9:48am
Print Post  
The diagram control does not impose any limit on zoom factor, but it seems browsers have a limit on the size of the Canvas element. In my tests with different browsers, Firefox reaches the limit first at about 10000 x 10000 pixels, so after zooming in you might check the canvas' width and height values, and restore the previous zoom factor if width or height got larger than 10000. I can't reproduce JavaScript errors, but you could try / catch for ones and restore zoom factor from the catch block too.

If you need to enable larger zoom levels, you could set smaller diagram.Bounds value before calling setZoomFactor. E.g. make Bounds size inversely proportional to the zoom factor and it should allow zooming into some area of the canvas indefinitely.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: insufficient storage room to complete this command
Reply #2 - Apr 11th, 2013 at 1:07pm
Print Post  
This version now supports a virtual scroll mode, which you can enable by calling diagram.setVirtualScroll(true):
https://mindfusion.eu/_beta/jsdiag_virtualscroll.zip

In that mode, the canvas is removed from its parent scrolling div but remains at the same position, stays as big as the div minus scrollbar sizes, and applies a translate-transform in response to div's events to implement scrolling of the diagram content. That should let you set large diagram.Bounds and ZoomFactor values.

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