Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Version 1.5 beta (Read 3832 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Version 1.5 beta
May 14th, 2013 at 9:41pm
Print Post  
Version 1.5 of MvcDiagram adds the following new features:

Node effects
Two visual effects, represented by GlassEffect and AeroEffect classes, can be applied to nodes. To apply an effect, create an instance of the respective class, set up its properties, then add the instance to the Effects collection of a node (or to Diagram.NodeEffects collection to apply it to all nodes). Effects can be added, removed or modified at any time and this will immediately reflect on the diagram. Effects of different types can be applied simultaneously. It is also possible to apply more than one effect of the same type.

Radial gradients
Nodes can be filled using radial gradients by passing objects in following format to setBrush. If the gradient should blend only two colors, they can be specified using color1 and color2 fields instead of colorStops.

Code
Select All
var brush =
{
 type: "RadialGradientBrush",
 colorStops:
 [
  { position: 0, color: "white" },
  { position: 0.5, color: "lightGray" },
  { position: 1, color: "blue" }
 ],
 x1: 20, y1: 20, radius1: 30,
 x2: 40, y2: 20, radius2: 80
};
node.setBrush(brush);
 



Multiple labels per link
The LinkLabel class allows multiple captions to be displayed for a single DiagramLink object. Link labels provide a set of properties allowing full customization of their display and positioning. Labels can also be arranged automatically to avoid overlapping nodes and other labels by setting LinkLabel.AutoArrange to true.

New events
~ nodeSelected and linkSelected events are now raised when an item is selected, either programmatically or by the user.
~ nodeDeselected and linkDeselected events are now raised when an item is deselected, either programmatically or by the user.
~ nodeDoubleClicked and linkDoubleClicked events raised when the user double clicks an item.
~ nodeCreating is now also raised while the user drags a node from the NodeListView control.

Miscellaneous
~ Call setVirtualScroll to enable virtual scrolling mode. In this mode, the canvas stays as big as its containing div, and its content is drawn with a translation bound to the div's scrollbar positions. This allow displaying large diagrams in browsers and on mobile devices where the size of HTML canvas elements is limited.
~ resizeToFitText method added to ShapeNode.
~ Improved support for nested containers.
~ DiagramView's *Script properties have been modified to chainable methods.
~ Use the FromRequest method of the DiagramView for easier recreation of the view's data after postback.
~ FallbackContent property allows specifying of a fallback content for the DiagramView.

If anyone is interested in trying the beta version, please download this archive containing the updated installer package:
https://mindfusion.eu/_beta/MvcDiagram15.zip

Any comments, questions and general feedback are welcome.
  
Back to top
 
IP Logged
 
Janis Armstrong
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 18th, 2013
Re: Version 1.5 beta
Reply #1 - Jul 18th, 2013 at 8:43am
Print Post  
Hi,
I just updated to the 1.5 version yesterday as I wanted to try out the new resize functionality (our company are evaluating for a customer at present).
Since I updated I get the following error when using the DiagramView.FromJson method, with either post data or with json from a previous version I am loading from the database:
"The given key is not present in the dictionary"
I noticed a similar error for the silverlight control and wondered if there is a solution yet?
Thanks
Janis
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Version 1.5 beta
Reply #2 - Jul 18th, 2013 at 9:20am
Print Post  
Hi,

Have you updated to this beta version or to the released version? Also have you replaced the diagramming.js file in your project with the one from the newer version.

Stoyan
  
Back to top
 
IP Logged
 
Janis Armstrong
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 18th, 2013
Re: Version 1.5 beta
Reply #3 - Jul 18th, 2013 at 9:32am
Print Post  
Hi,
I dowloaded the zip file attached to your post, copied the dlls into my MVC project and copied the new javascript file into the relevant script folder in my project. Since then I have been unable to save trees or load any from saved Json.
Janis
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Version 1.5 beta
Reply #4 - Jul 18th, 2013 at 9:56am
Print Post  
Hi,

Try the released version from http://mindfusion.eu/Forum/YaBB.pl?num=1369808631, and also try clearing the browser cache after replacing the .js file. If the problem still happens, please attach here the Json as a text file for our developer to investigate.

The FromJson method might not be backward compatible though, we consider it used only for exchanging data between the client and server, and if you use latest version of both the .js and .dll files you shouldn't have problems loading posted data. For storing data on the server, use the various SaveTo methods of the Diagram class. If you prefer storing data in Json format, we'll implement some backward compatibility in the next few days.

Stoyan
  
Back to top
 
IP Logged
 
Janis Armstrong
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 18th, 2013
Re: Version 1.5 beta
Reply #5 - Jul 18th, 2013 at 10:12am
Print Post  
Hi Stoyan,
Clearing the browser cache after copying the javascript file appears to fix the issue with the post data, many thanks.
As I am just evaluating at the moment the issue with the saved json is not so important. I save the diagram as json so that I can insert database ids for custom editing. The tool seems to work very well for what our customer needs.
Janis
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Version 1.5 beta
Reply #6 - Jul 30th, 2013 at 9:53am
Print Post  
Hi,

This version implements backward compatibility for the Json format too:
https://mindfusion.eu/_beta/mvcdiag_jsonback.zip

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